[cfe-commits] r64665 - /cfe/branches/Apple/objective-rewrite/tools/clang/lib/Sema/SemaExpr.cpp

Steve Naroff snaroff at apple.com
Mon Feb 16 11:59:01 PST 2009


Author: snaroff
Date: Mon Feb 16 13:59:01 2009
New Revision: 64665

URL: http://llvm.org/viewvc/llvm-project?rev=64665&view=rev
Log:
Fold Doug's fix (http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090216/012450.html) into the objective-rewrite branch.

This fixes <rdar://problem/6590445> clang ObjC rewriter: REGRESSION: objc_translate-13: calling block results in compiler error.


Modified:
    cfe/branches/Apple/objective-rewrite/tools/clang/lib/Sema/SemaExpr.cpp

Modified: cfe/branches/Apple/objective-rewrite/tools/clang/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/objective-rewrite/tools/clang/lib/Sema/SemaExpr.cpp?rev=64665&r1=64664&r2=64665&view=diff

==============================================================================
--- cfe/branches/Apple/objective-rewrite/tools/clang/lib/Sema/SemaExpr.cpp (original)
+++ cfe/branches/Apple/objective-rewrite/tools/clang/lib/Sema/SemaExpr.cpp Mon Feb 16 13:59:01 2009
@@ -549,20 +549,6 @@
     return ExprError();
   LookupResult Lookup = LookupParsedName(S, SS, Name, LookupOrdinaryName);
 
-  if (getLangOptions().CPlusPlus && (!SS || !SS->isSet()) && 
-      HasTrailingLParen && Lookup.getKind() == LookupResult::NotFound) {
-    // We've seen something of the form
-    //
-    //   identifier(
-    //
-    // and we did not find any entity by the name
-    // "identifier". However, this identifier is still subject to
-    // argument-dependent lookup, so keep track of the name.
-    return Owned(new (Context) UnresolvedFunctionNameExpr(Name,
-                                                          Context.OverloadTy,
-                                                          Loc));
-  }
-
   NamedDecl *D = 0;
   if (Lookup.isAmbiguous()) {
     DiagnoseAmbiguousLookup(Lookup, Name, Loc,
@@ -602,6 +588,19 @@
       return Owned(new (Context) ObjCSuperExpr(Loc, T));
     }
   }
+  if (getLangOptions().CPlusPlus && (!SS || !SS->isSet()) && 
+      HasTrailingLParen && Lookup.getKind() == LookupResult::NotFound) {
+    // We've seen something of the form
+    //
+    //   identifier(
+    //
+    // and we did not find any entity by the name
+    // "identifier". However, this identifier is still subject to
+    // argument-dependent lookup, so keep track of the name.
+    return Owned(new (Context) UnresolvedFunctionNameExpr(Name,
+                                                          Context.OverloadTy,
+                                                          Loc));
+  }
   if (D == 0) {
     // Otherwise, this could be an implicitly declared function reference (legal
     // in C90, extension in C99).





More information about the cfe-commits mailing list