From: Argyrios Kyrtzidis Date: Mon, 31 Oct 2011 07:20:23 +0000 (+0000) Subject: Fix the source range for ObjCInterfaces that are forward decls. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d1cf3ff6c7e34fce764293cd2900fce99a60ed69;p=clang 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 --- 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