summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaObjCProperty.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-11-17 01:03:52 +0000
committerDouglas Gregor <dgregor@apple.com>2010-11-17 01:03:52 +0000
commitb1b71e50a0767f429122c92d38c9e227472fb26d (patch)
tree8e5e06b6726aae03207a2a29b44301fd7d420163 /clang/lib/Sema/SemaObjCProperty.cpp
parentbcc230a7653624d5e2854e4718dbf9fe07aacd9f (diff)
downloadbcm5719-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/Sema/SemaObjCProperty.cpp')
-rw-r--r--clang/lib/Sema/SemaObjCProperty.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp
index fe2de27c6c8..65002f3ea03 100644
--- a/clang/lib/Sema/SemaObjCProperty.cpp
+++ b/clang/lib/Sema/SemaObjCProperty.cpp
@@ -318,7 +318,8 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
bool Synthesize,
Decl *ClassCatImpDecl,
IdentifierInfo *PropertyId,
- IdentifierInfo *PropertyIvar) {
+ IdentifierInfo *PropertyIvar,
+ SourceLocation PropertyIvarLoc) {
ObjCContainerDecl *ClassImpDecl =
cast_or_null<ObjCContainerDecl>(ClassCatImpDecl);
// Make sure we have a context for the property implementation declaration.
@@ -474,7 +475,7 @@ Decl *Sema::ActOnPropertyImplDecl(Scope *S,
(Synthesize ?
ObjCPropertyImplDecl::Synthesize
: ObjCPropertyImplDecl::Dynamic),
- Ivar);
+ Ivar, PropertyIvarLoc);
if (ObjCMethodDecl *getterMethod = property->getGetterMethodDecl()) {
getterMethod->createImplicitParams(Context, IDecl);
if (getLangOptions().CPlusPlus && Synthesize &&
@@ -997,7 +998,8 @@ void Sema::DefaultSynthesizeProperties (Scope *S, ObjCImplDecl* IMPDecl,
// to help users.
ActOnPropertyImplDecl(S, SourceLocation(), SourceLocation(),
true,IMPDecl,
- Prop->getIdentifier(), Prop->getIdentifier());
+ Prop->getIdentifier(), Prop->getIdentifier(),
+ SourceLocation());
}
}
OpenPOWER on IntegriCloud