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.

llvm-svn: 115421
This commit is contained in:
Douglas Gregor 2010-10-02 21:06:43 +00:00
parent db9fb5a427
commit 3022037787
4 changed files with 25 additions and 0 deletions

View File

@ -991,6 +991,7 @@ public:
void insertNextClassCategory() {
NextClassCategory = ClassInterface->getCategoryList();
ClassInterface->setCategoryList(this);
ClassInterface->setChangedSinceDeserialization(true);
}
bool IsClassExtension() const { return getIdentifier() == 0; }

View File

@ -10,3 +10,7 @@ void foo1() {
//(void)@selector(x);
(void)@selector(f);
}
@interface X (Blah)
- (void)blah_method;
@end

View File

@ -9,3 +9,7 @@ void foo2() {
//(void)@selector(y);
//(void)@selector(e);
}
@interface X (Blarg)
- (void)blarg_method;
@end

View 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