diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-06-16 00:46:02 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-06-16 00:46:02 +0000 |
commit | a0cff720d40f239fee0e5ecc8378122b456c1991 (patch) | |
tree | 208d410b6a8effba206193579ae69b29d3b636a0 /lib/Serialization/ASTReaderDecl.cpp | |
parent | 843f0e87e5ab9b5b5c36b60e99a350d15679683a (diff) |
[AST/libclang] Fix the selector locations that are reported for a
method definition that has its '{' attached to the method name without
a space.
With a method like:
-(id)meth{
.....
}
the logic in ObjCMethodDecl that determined the selector locations got
confused because it was initialized based on an end location for '{' but
that end location changed to '}' after the method was finished.
Fix this by having an immutable end location for the declarator and
for getLocEnd() get the end location from the body itself.
Fixes rdar://11659739.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158583 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r-- | lib/Serialization/ASTReaderDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReaderDecl.cpp b/lib/Serialization/ASTReaderDecl.cpp index d9e060c91d..f5f9ba2598 100644 --- a/lib/Serialization/ASTReaderDecl.cpp +++ b/lib/Serialization/ASTReaderDecl.cpp @@ -655,7 +655,7 @@ void ASTDeclReader::VisitObjCMethodDecl(ObjCMethodDecl *MD) { MD->SetRelatedResultType(Record[Idx++]); MD->setResultType(Reader.readType(F, Record, Idx)); MD->setResultTypeSourceInfo(GetTypeSourceInfo(Record, Idx)); - MD->setEndLoc(ReadSourceLocation(Record, Idx)); + MD->DeclEndLoc = ReadSourceLocation(Record, Idx); unsigned NumParams = Record[Idx++]; SmallVector<ParmVarDecl *, 16> Params; Params.reserve(NumParams); |