aboutsummaryrefslogtreecommitdiff
path: root/include
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
commitd1cf3ff6c7e34fce764293cd2900fce99a60ed69 (patch)
tree05206a2b3871d86488845fd9c1b4c76bc0f7cfa4 /include
parent092294918b5649cac05d6442aae75f7904ef772e (diff)
Fix the source range for ObjCInterfaces that are forward decls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/DeclObjC.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h
index 136acf377f..b717af0d01 100644
--- a/include/clang/AST/DeclObjC.h
+++ b/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