[cfe-commits] r115421 - in /cfe/trunk: include/clang/AST/DeclObjC.h test/PCH/Inputs/chain-selectors1.h test/PCH/Inputs/chain-selectors2.h test/PCH/chain-selectors.m

Douglas Gregor dgregor at apple.com
Sat Oct 2 14:06:43 PDT 2010


Author: dgregor
Date: Sat Oct  2 16:06:43 2010
New Revision: 115421

URL: http://llvm.org/viewvc/llvm-project?rev=115421&view=rev
Log:
When we insert a category (or class extension) into an interface, mark
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.

Modified:
    cfe/trunk/include/clang/AST/DeclObjC.h
    cfe/trunk/test/PCH/Inputs/chain-selectors1.h
    cfe/trunk/test/PCH/Inputs/chain-selectors2.h
    cfe/trunk/test/PCH/chain-selectors.m

Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=115421&r1=115420&r2=115421&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Sat Oct  2 16:06:43 2010
@@ -991,6 +991,7 @@
   void insertNextClassCategory() {
     NextClassCategory = ClassInterface->getCategoryList();
     ClassInterface->setCategoryList(this);
+    ClassInterface->setChangedSinceDeserialization(true);
   }
 
   bool IsClassExtension() const { return getIdentifier() == 0; }

Modified: cfe/trunk/test/PCH/Inputs/chain-selectors1.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/Inputs/chain-selectors1.h?rev=115421&r1=115420&r2=115421&view=diff
==============================================================================
--- cfe/trunk/test/PCH/Inputs/chain-selectors1.h (original)
+++ cfe/trunk/test/PCH/Inputs/chain-selectors1.h Sat Oct  2 16:06:43 2010
@@ -10,3 +10,7 @@
   //(void)@selector(x);
   (void)@selector(f);
 }
+
+ at interface X (Blah)
+- (void)blah_method;
+ at end

Modified: cfe/trunk/test/PCH/Inputs/chain-selectors2.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/Inputs/chain-selectors2.h?rev=115421&r1=115420&r2=115421&view=diff
==============================================================================
--- cfe/trunk/test/PCH/Inputs/chain-selectors2.h (original)
+++ cfe/trunk/test/PCH/Inputs/chain-selectors2.h Sat Oct  2 16:06:43 2010
@@ -9,3 +9,7 @@
   //(void)@selector(y);
   //(void)@selector(e);
 }
+
+ at interface X (Blarg)
+- (void)blarg_method;
+ at end

Modified: cfe/trunk/test/PCH/chain-selectors.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/chain-selectors.m?rev=115421&r1=115420&r2=115421&view=diff
==============================================================================
--- cfe/trunk/test/PCH/chain-selectors.m (original)
+++ cfe/trunk/test/PCH/chain-selectors.m Sat Oct  2 16:06:43 2010
@@ -22,3 +22,19 @@
   (void)@selector(y); // expected-warning {{unimplemented selector}}
   (void)@selector(e); // expected-warning {{unimplemented selector}}
 }
+
+ at implementation X (Blah)
+- (void)test_Blah {
+  [self blah_method];
+}
+
+- (void)blah_method { }
+ at end
+
+ at implementation X (Blarg)
+- (void)test_Blarg {
+  [self blarg_method];
+}
+
+- (void)blarg_method { }
+ at end





More information about the cfe-commits mailing list