diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-30 23:18:26 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-30 23:18:26 +0000 |
commit | 8d39c3ddfc17d9e768a17eb0ce9f11c33bf9d50a (patch) | |
tree | 6931105d484e9a86f4e4470c38479ec818c6a9c4 /test/PCH | |
parent | 436bd50a3821c0f7a859af0e423d5c0a55159bf1 (diff) |
[PCH] In ASTReader::FinishedDeserializing, after we do PassInterestingDeclsToConsumer
we may end up having added more pending stuff to do, so go in a loop until everything
is cleared out.
This fixes the error in rdar://10278815 which has a certain David Lynch-esque quality..
error: unknown type name 'BOOL'; did you mean 'BOOL'?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/pending-ids.m | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/PCH/pending-ids.m b/test/PCH/pending-ids.m new file mode 100644 index 0000000000..b612d89e94 --- /dev/null +++ b/test/PCH/pending-ids.m @@ -0,0 +1,33 @@ +// Test for rdar://10278815 + +// Without PCH +// RUN: %clang_cc1 -fsyntax-only -verify -include %s %s + +// With PCH +// RUN: %clang_cc1 %s -emit-pch -o %t +// RUN: %clang_cc1 -emit-llvm-only -verify %s -include-pch %t -g + +#ifndef HEADER +#define HEADER +//===----------------------------------------------------------------------===// +// Header + +typedef char BOOL; + +@interface NSString ++ (BOOL)meth; +@end + +static NSString * const cake = @"cake"; + +//===----------------------------------------------------------------------===// +#else +//===----------------------------------------------------------------------===// + +@interface Foo { + BOOL ivar; +} +@end + +//===----------------------------------------------------------------------===// +#endif |