diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-18 08:49:37 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-07-18 08:49:37 +0000 |
commit | ecd1bae999a1d6196cd0882e96e637d23ce69b12 (patch) | |
tree | 2be1d6a432d66dbd42bbb44346c966d197c63f09 | |
parent | 93cbae3bc6a8a5cc963b3b8e5cc2f49386be70df (diff) |
Don't add a SourceLocation for 'self' if it does not actually appears in the source code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76295 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Sema/SemaExpr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index 1304558042..35c0ddb06d 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -902,7 +902,8 @@ Sema::ActOnDeclarationNameExpr(Scope *S, SourceLocation Loc, // FIXME: This should use a new expr for a direct reference, don't // turn this into Self->ivar, just return a BareIVarExpr or something. IdentifierInfo &II = Context.Idents.get("self"); - OwningExprResult SelfExpr = ActOnIdentifierExpr(S, Loc, II, false); + OwningExprResult SelfExpr = ActOnIdentifierExpr(S, SourceLocation(), + II, false); MarkDeclarationReferenced(Loc, IV); return Owned(new (Context) ObjCIvarRefExpr(IV, IV->getType(), Loc, |