[cfe-commits] r49943 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Nate Begeman natebegeman at mac.com
Fri Apr 18 16:35:22 PDT 2008


Author: sampo
Date: Fri Apr 18 18:35:14 2008
New Revision: 49943

URL: http://llvm.org/viewvc/llvm-project?rev=49943&view=rev
Log:
Ignore qualifiers when attempting to match arguments to parameter types for 
__builtin_overload


Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=49943&r1=49942&r2=49943&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Fri Apr 18 18:35:14 2008
@@ -2168,10 +2168,13 @@
 /// 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;
 }
 





More information about the cfe-commits mailing list