diff options
author | Nate Begeman <natebegeman@mac.com> | 2008-04-18 23:35:14 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2008-04-18 23:35:14 +0000 |
commit | 46bd037c07d2e8e39adbb9b229d588dd7052980d (patch) | |
tree | 2faf49e1ad86ba39d1d84a83113e31c34f3d8f93 /clang/lib | |
parent | ce4d7fce6b09e0ef596cdbbe883c77676b598885 (diff) | |
download | bcm5719-llvm-46bd037c07d2e8e39adbb9b229d588dd7052980d.tar.gz bcm5719-llvm-46bd037c07d2e8e39adbb9b229d588dd7052980d.zip |
Ignore qualifiers when attempting to match arguments to parameter types for
__builtin_overload
llvm-svn: 49943
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index fd02443d80f..e3298f37af5 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -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; } |