forked from OSchip/llvm-project
Ignore qualifiers when attempting to match arguments to parameter types for
__builtin_overload llvm-svn: 49943
This commit is contained in:
parent
ce4d7fce6b
commit
46bd037c07
|
@ -2168,10 +2168,13 @@ Sema::ExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc, ExprTy *cond,
|
|||
/// arguments in FnType.
|
||||
static bool ExprsMatchFnType(Expr **Args, const FunctionTypeProto *FnType) {
|
||||
unsigned NumParams = FnType->getNumArgs();
|
||||
for (unsigned i = 0; i != NumParams; ++i)
|
||||
if (Args[i]->getType().getCanonicalType() !=
|
||||
FnType->getArgType(i).getCanonicalType())
|
||||
for (unsigned i = 0; i != NumParams; ++i) {
|
||||
QualType ExprTy = Args[i]->getType().getCanonicalType();
|
||||
QualType ParmTy = FnType->getArgType(i).getCanonicalType();
|
||||
|
||||
if (ExprTy.getUnqualifiedType() != ParmTy.getUnqualifiedType())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue