aboutsummaryrefslogtreecommitdiff
path: root/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
commita4ffd85a6684e42f900aad5459e58ad91bb88755 (patch)
tree7675a1f7f57a054e26c60c87ddd2532a844a08ae /lib/Sema/SemaObjCProperty.cpp
parent1e7e877091187556bb6d644ab2b7c00a628121eb (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r--lib/Sema/SemaObjCProperty.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp
index fe2de27c6c..65002f3ea0 100644
--- a/lib/Sema/SemaObjCProperty.cpp
+++ b/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());
}
}