summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReaderDecl.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-07 01:20:12 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-07 01:20:12 +0000
commitc7c6431860dac773594f47db50d57c61361144b7 (patch)
treeb1e2919f13cafc2a6354d14afe851d2dde48c78f /clang/lib/Frontend/PCHReaderDecl.cpp
parentb58514e613323d3907ba67a3279cacd37c673059 (diff)
downloadbcm5719-llvm-c7c6431860dac773594f47db50d57c61361144b7.tar.gz
bcm5719-llvm-c7c6431860dac773594f47db50d57c61361144b7.zip
Change ObjCContainerDecl to contain the entire range for the '@end'
piece of the declaration. The '@' and the 'end' are separate tokens, and require two SourceLocations to accurately track. This change was motivated because ObjCContainerDecl::getSourceRange() would previously not return the entire range of the declaration (the 'end' would be left off). llvm-svn: 92891
Diffstat (limited to 'clang/lib/Frontend/PCHReaderDecl.cpp')
-rw-r--r--clang/lib/Frontend/PCHReaderDecl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PCHReaderDecl.cpp b/clang/lib/Frontend/PCHReaderDecl.cpp
index 01e1a4191a9..91568f182da 100644
--- a/clang/lib/Frontend/PCHReaderDecl.cpp
+++ b/clang/lib/Frontend/PCHReaderDecl.cpp
@@ -208,7 +208,9 @@ void PCHDeclReader::VisitObjCMethodDecl(ObjCMethodDecl *MD) {
void PCHDeclReader::VisitObjCContainerDecl(ObjCContainerDecl *CD) {
VisitNamedDecl(CD);
- CD->setAtEndLoc(SourceLocation::getFromRawEncoding(Record[Idx++]));
+ SourceLocation A = SourceLocation::getFromRawEncoding(Record[Idx++]);
+ SourceLocation B = SourceLocation::getFromRawEncoding(Record[Idx++]);
+ CD->setAtEndRange(SourceRange(A, B));
}
void PCHDeclReader::VisitObjCInterfaceDecl(ObjCInterfaceDecl *ID) {
OpenPOWER on IntegriCloud