diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-11-17 01:03:52 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-11-17 01:03:52 +0000 |
commit | b1b71e50a0767f429122c92d38c9e227472fb26d (patch) | |
tree | 8e5e06b6726aae03207a2a29b44301fd7d420163 /clang/lib/Parse/ParseObjc.cpp | |
parent | bcc230a7653624d5e2854e4718dbf9fe07aacd9f (diff) | |
download | bcm5719-llvm-b1b71e50a0767f429122c92d38c9e227472fb26d.tar.gz bcm5719-llvm-b1b71e50a0767f429122c92d38c9e227472fb26d.zip |
For an Objective-C @synthesize statement, e.g.,
@synthesize foo = _foo;
keep track of the location of the ivar ("_foo"). Teach libclang to
visit the ivar as a member reference.
llvm-svn: 119447
Diffstat (limited to 'clang/lib/Parse/ParseObjc.cpp')
-rw-r--r-- | clang/lib/Parse/ParseObjc.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseObjc.cpp b/clang/lib/Parse/ParseObjc.cpp index d18efac5e2c..c01bea9cb5a 100644 --- a/clang/lib/Parse/ParseObjc.cpp +++ b/clang/lib/Parse/ParseObjc.cpp @@ -1431,6 +1431,7 @@ Decl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) { IdentifierInfo *propertyIvar = 0; IdentifierInfo *propertyId = Tok.getIdentifierInfo(); SourceLocation propertyLoc = ConsumeToken(); // consume property name + SourceLocation propertyIvarLoc; if (Tok.is(tok::equal)) { // property '=' ivar-name ConsumeToken(); // consume '=' @@ -1446,10 +1447,10 @@ Decl *Parser::ParseObjCPropertySynthesize(SourceLocation atLoc) { break; } propertyIvar = Tok.getIdentifierInfo(); - ConsumeToken(); // consume ivar-name + propertyIvarLoc = ConsumeToken(); // consume ivar-name } Actions.ActOnPropertyImplDecl(getCurScope(), atLoc, propertyLoc, true, ObjCImpDecl, - propertyId, propertyIvar); + propertyId, propertyIvar, propertyIvarLoc); if (Tok.isNot(tok::comma)) break; ConsumeToken(); // consume ',' @@ -1489,7 +1490,7 @@ Decl *Parser::ParseObjCPropertyDynamic(SourceLocation atLoc) { IdentifierInfo *propertyId = Tok.getIdentifierInfo(); SourceLocation propertyLoc = ConsumeToken(); // consume property name Actions.ActOnPropertyImplDecl(getCurScope(), atLoc, propertyLoc, false, ObjCImpDecl, - propertyId, 0); + propertyId, 0, SourceLocation()); if (Tok.isNot(tok::comma)) break; |