summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-16 00:46:02 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-06-16 00:46:02 +0000
commit33b4bfcef5385c39d8dab6181d53fcadc74756bf (patch)
tree4467b2ef79aa1a9f499c3c6f5bbf378964f010f8 /clang/lib/Serialization
parent52de271da1d56fe80e924bb57659de96e06246fd (diff)
downloadbcm5719-llvm-33b4bfcef5385c39d8dab6181d53fcadc74756bf.tar.gz
bcm5719-llvm-33b4bfcef5385c39d8dab6181d53fcadc74756bf.zip
[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. llvm-svn: 158583
Diffstat (limited to 'clang/lib/Serialization')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index d9e060c91df..f5f9ba25988 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud