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 | 74a9f98522d8801c57ac117294164fb7484762c6 (patch) | |
| tree | 8f50d3c26fb6a69ef635650f16f8bc81472857c3 /clang/lib/Sema/SemaObjCProperty.cpp | |
| parent | 6e1ce29b012ad96760c8729a2618bc98f866276e (diff) | |
| download | bcm5719-llvm-74a9f98522d8801c57ac117294164fb7484762c6.tar.gz bcm5719-llvm-74a9f98522d8801c57ac117294164fb7484762c6.zip | |
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>
llvm-svn: 114714
Diffstat (limited to 'clang/lib/Sema/SemaObjCProperty.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaObjCProperty.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaObjCProperty.cpp b/clang/lib/Sema/SemaObjCProperty.cpp index 2ba39dc3cd1..fbb87b9bf46 100644 --- a/clang/lib/Sema/SemaObjCProperty.cpp +++ b/clang/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, |

