]> granicus.if.org Git - clang/commitdiff
When we insert a category (or class extension) into an interface, mark
authorDouglas Gregor <dgregor@apple.com>
Sat, 2 Oct 2010 21:06:43 +0000 (21:06 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 2 Oct 2010 21:06:43 +0000 (21:06 +0000)
the interface as having changed since it was originally
serialized. This ensures that we see class extensions/categories in
chained PCH files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115421 91177308-0d34-0410-b5e6-96231b3b80d8

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

index ad26748e1343d888a645cca2dc99f9db857fdd42..5dde92eb0be765d1ff56e7dbf12a1c46fb2558ed 100644 (file)
@@ -991,6 +991,7 @@ public:
   void insertNextClassCategory() {
     NextClassCategory = ClassInterface->getCategoryList();
     ClassInterface->setCategoryList(this);
+    ClassInterface->setChangedSinceDeserialization(true);
   }
 
   bool IsClassExtension() const { return getIdentifier() == 0; }
index 37c1c00b57415da22e433ad29666b188244fa01d..b0b68f8332c11ca8d96f31815c7490963a8490fb 100644 (file)
@@ -10,3 +10,7 @@ void foo1() {
   //(void)@selector(x);
   (void)@selector(f);
 }
+
+@interface X (Blah)
+- (void)blah_method;
+@end
index 4d6b556630085df57d435e8f5786fe03ea659af1..973fc107e90ebe56b382ab14b5f5b220df043998 100644 (file)
@@ -9,3 +9,7 @@ void foo2() {
   //(void)@selector(y);
   //(void)@selector(e);
 }
+
+@interface X (Blarg)
+- (void)blarg_method;
+@end
index 60db3f994b7166bb4b1deae27db6c9c56741eb79..3b19172799c537ecf7de7fbbe249da4706402a7a 100644 (file)
@@ -22,3 +22,19 @@ void bar() {
   (void)@selector(y); // expected-warning {{unimplemented selector}}
   (void)@selector(e); // expected-warning {{unimplemented selector}}
 }
+
+@implementation X (Blah)
+- (void)test_Blah {
+  [self blah_method];
+}
+
+- (void)blah_method { }
+@end
+
+@implementation X (Blarg)
+- (void)test_Blarg {
+  [self blarg_method];
+}
+
+- (void)blarg_method { }
+@end