]> granicus.if.org Git - clang/commitdiff
Don't add a SourceLocation for 'self' if it does not actually appears in the source...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 18 Jul 2009 08:49:37 +0000 (08:49 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Sat, 18 Jul 2009 08:49:37 +0000 (08:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76295 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaExpr.cpp

index 1304558042808a5a37e656644da6412fe8672427..35c0ddb06dd65d2a265ef125b9a623c28515e206 100644 (file)
@@ -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,