diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-11-19 17:10:50 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-11-19 17:10:50 +0000 |
| commit | 3a001f48e4492d7f4a8e0607a3ea3d206827bc33 (patch) | |
| tree | cce35805cc0f4f1cae651cf8e0d6e4cad2189d5b /clang/test/Parser | |
| parent | 2e49eaa92f7e33469dd5913c243e7cf5e27db70b (diff) | |
| download | bcm5719-llvm-3a001f48e4492d7f4a8e0607a3ea3d206827bc33.tar.gz bcm5719-llvm-3a001f48e4492d7f4a8e0607a3ea3d206827bc33.zip | |
When parsing something that looks like an ill-formed
protocol-qualifier list without a leading type (e.g., <#blah#>), don't
complain about it being an archaic protocol-qualifier list unless it
actually parses as one.
llvm-svn: 119805
Diffstat (limited to 'clang/test/Parser')
| -rw-r--r-- | clang/test/Parser/placeholder-recovery.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Parser/placeholder-recovery.m b/clang/test/Parser/placeholder-recovery.m new file mode 100644 index 00000000000..1fc154955d5 --- /dev/null +++ b/clang/test/Parser/placeholder-recovery.m @@ -0,0 +1,12 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +// FIXME: We could do much better with this, if we recognized +// placeholders somehow. However, we're content with not generating +// bogus 'archaic' warnings with bad location info. +@protocol <#protocol name#> <NSObject> // expected-error 2{{expected identifier}} \ +// expected-error{{cannot find protocol declaration for 'NSObject'}} \ +// expected-warning{{protocol qualifiers without 'id'}} + +<#methods#> // expected-error{{expected identifier}} + +@end // expected-error{{prefix attribute}} |

