[cfe-commits] r143343 - /cfe/trunk/include/clang/AST/DeclObjC.h

Argyrios Kyrtzidis akyrtzi at gmail.com
Mon Oct 31 00:20:24 PDT 2011


Author: akirtzidis
Date: Mon Oct 31 02:20:23 2011
New Revision: 143343

URL: http://llvm.org/viewvc/llvm-project?rev=143343&view=rev
Log:
Fix the source range for ObjCInterfaces that are forward decls.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=143343&r1=143342&r2=143343&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Mon Oct 31 02:20:23 2011
@@ -592,6 +592,12 @@
                                    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





More information about the cfe-commits mailing list