[cfe-commits] r148053 - /cfe/trunk/lib/AST/Expr.cpp

Argyrios Kyrtzidis akyrtzi at gmail.com
Thu Jan 12 14:34:19 PST 2012


Author: akirtzidis
Date: Thu Jan 12 16:34:19 2012
New Revision: 148053

URL: http://llvm.org/viewvc/llvm-project?rev=148053&view=rev
Log:
If an ObjCMessageExpr is implicit, there are no source locations for the
selector identifiers.

It was difficult to form a test case for it unfortunately.

Modified:
    cfe/trunk/lib/AST/Expr.cpp

Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=148053&r1=148052&r2=148053&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Thu Jan 12 16:34:19 2012
@@ -2872,9 +2872,11 @@
     MyArgs[I] = Args[I];
   }
 
-  SelLocsKind = SelLocsK;
-  if (SelLocsK == SelLoc_NonStandard)
-    std::copy(SelLocs.begin(), SelLocs.end(), getStoredSelLocs());
+  if (!isImplicit()) {
+    SelLocsKind = SelLocsK;
+    if (SelLocsK == SelLoc_NonStandard)
+      std::copy(SelLocs.begin(), SelLocs.end(), getStoredSelLocs());
+  }
 }
 
 ObjCMessageExpr *ObjCMessageExpr::Create(ASTContext &Context, QualType T,





More information about the cfe-commits mailing list