diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-12 22:34:19 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-01-12 22:34:19 +0000 |
commit | 0c6b8e3fa718a0a67292340e5cff6fe7cbd15c14 (patch) | |
tree | debc6e947b331cdb644c7bf1a10f7bc2287c3d5b /lib/AST/Expr.cpp | |
parent | 3b4b047ff0ebaefeaed0a5f545b4fa91f18e6cdb (diff) |
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
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<Expr *> 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, |