summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-31 07:20:23 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-10-31 07:20:23 +0000
commit3b36df55562dcaf3efda68c8f05428a5bdd12ce9 (patch)
treeed5db649cd39334efa6eeadd31ea3239e869e9bd
parent1b544e3cf03006333e8c95af8d89ea6505546120 (diff)
downloadbcm5719-llvm-3b36df55562dcaf3efda68c8f05428a5bdd12ce9.tar.gz
bcm5719-llvm-3b36df55562dcaf3efda68c8f05428a5bdd12ce9.zip
Fix the source range for ObjCInterfaces that are forward decls.
llvm-svn: 143343
-rw-r--r--clang/include/clang/AST/DeclObjC.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/include/clang/AST/DeclObjC.h b/clang/include/clang/AST/DeclObjC.h
index 136acf377f9..b717af0d01b 100644
--- a/clang/include/clang/AST/DeclObjC.h
+++ b/clang/include/clang/AST/DeclObjC.h
@@ -592,6 +592,12 @@ public:
SourceLocation ClassLoc = SourceLocation(),
bool ForwardDecl = false,
bool isInternal = false);
+
+ virtual SourceRange getSourceRange() const {
+ if (isForwardDecl())
+ return SourceRange(getAtStartLoc(), getLocation());
+ return ObjCContainerDecl::getSourceRange();
+ }
/// \brief Indicate that this Objective-C class is complete, but that
/// the external AST source will be responsible for filling in its contents
OpenPOWER on IntegriCloud