-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Description
| Bugzilla Link | 9729 |
| Resolution | FIXED |
| Resolved on | Aug 07, 2018 06:49 |
| Version | trunk |
| OS | All |
Extended Description
I recently got this error compiling some code with clang:
CGObjCGNU.cpp:250:9: error: call to 'get' is ambiguous
IdTy = llvm::StructType::get(Context, OpaqueIdTy, NULL);
^~~~~~~~~~~~~~~~~~~~~
/usr/home/theraven/llvm/include/llvm/DerivedTypes.h:246:22: note: candidate function
static StructType *get(LLVMContext &Context,
^
/usr/home/theraven/llvm/include/llvm/DerivedTypes.h:260:22: note: candidate function
static StructType *get(LLVMContext &Context,
^
1 error generated.
From the two error lines, the candidate functions appear identical. In contrast, GCC gives this error:
error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/usr/home/theraven/llvm/include/llvm/DerivedTypes.h:248: note: candidate 1: static llvm::StructType* llvm::StructType::get(llvm::LLVMContext&, llvm::ArrayRef<const llvm::Type*>, bool)
/usr/home/theraven/llvm/include/llvm/DerivedTypes.h:261: note: candidate 2: static llvm::StructType* llvm::StructType::get(llvm::LLVMContext&, const llvm::Type*, ...)
While this isn't as pretty, it does actually give me useful information.