diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-04 04:48:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-04 04:48:02 +0000 |
commit | 1711fc91efb36d131f7ba771f73f0154dc1abd1f (patch) | |
tree | ea5f1805dd7f1a99b466b8bb45994dcb3f2041ac /lib/Rewrite/RewriteObjC.cpp | |
parent | 55d78d2a41bed08f222a1eebf4feebec60ba1056 (diff) |
Improve location fidelity of objc decls.
-Add the location of the class name to all objc container decls, not just ObjCInterfaceDecl.
-Make objc decls consistent with the rest of the NamedDecls and have getLocation() point to the
class name, not the location of '@'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141061 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r-- | lib/Rewrite/RewriteObjC.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp index a62f4aa622..c7a567812e 100644 --- a/lib/Rewrite/RewriteObjC.cpp +++ b/lib/Rewrite/RewriteObjC.cpp @@ -3359,7 +3359,7 @@ void RewriteObjC::SynthesizeObjCInternalStruct(ObjCInterfaceDecl *CDecl, // This clause is segregated to avoid breaking the common case. if (BufferContainsPPDirectives(startBuf, cursor)) { SourceLocation L = RCDecl ? CDecl->getSuperClassLoc() : - CDecl->getClassLoc(); + CDecl->getAtStartLoc(); const char *endHeader = SM->getCharacterData(L); endHeader += Lexer::MeasureTokenLength(L, *SM, LangOpts); |