diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-09-24 01:23:01 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-09-24 01:23:01 +0000 |
commit | 2a6af6b7874e41f3e6213e8d18623c4bac150354 (patch) | |
tree | f7f20874b7244aece6a0ffbbbf9c97e97af36dc0 /lib/Sema/SemaObjCProperty.cpp | |
parent | bfd21240b6b4989854c8f5331dc86ce7aecf1ad4 (diff) |
Default synthesized ivars don't really have a location in the source. Using the location of the @implementation
is just confusing for clients that want to use SourceLocations for syntactic references.
Fixes: <rdar://problem/8470540>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114714 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 2ba39dc3cd..fbb87b9bf4 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -971,10 +971,15 @@ void Sema::DefaultSynthesizeProperties (Scope *S, ObjCImplDecl* IMPDecl, continue; } - ActOnPropertyImplDecl(S, IMPDecl->getLocation(), IMPDecl->getLocation(), - true, IMPDecl, + + // We use invalid SourceLocations for the synthesized ivars since they + // aren't really synthesized at a particular location; they just exist. + // Saying that they are located at the @implementation isn't really going + // to help users. + ActOnPropertyImplDecl(S, SourceLocation(), SourceLocation(), + true,IMPDecl, Prop->getIdentifier(), Prop->getIdentifier()); - } + } } void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl, |