From: Argyrios Kyrtzidis Date: Thu, 12 Jan 2012 22:34:19 +0000 (+0000) Subject: If an ObjCMessageExpr is implicit, there are no source locations for the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c6b8e3fa718a0a67292340e5cff6fe7cbd15c14;p=clang 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148053 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index e7177aabe2..b94a08db73 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -2872,9 +2872,11 @@ void ObjCMessageExpr::initArgsAndSelLocs(ArrayRef Args, 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,