From 0037e088114ce65199f3d705a8676860f2fbc9e6 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Thu, 12 Jan 2012 22:34:19 +0000 Subject: [PATCH] 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. llvm-svn: 148053 --- clang/lib/AST/Expr.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index e7177aabe2b6..b94a08db73a4 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/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, -- GitLab