diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-06-05 00:50:43 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-06-05 00:50:43 +0000 |
commit | 29b1d07a87a2038ae5b4128a0b534badd728707d (patch) | |
tree | cf67b656572cb45ca1fdac1931bab2f71686bf57 /test/Parser | |
parent | 9991479ad5dde617168cc1e4b18425cdbbfd9fa9 (diff) |
Test for parsing #pragma weak.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/pragma-weak.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Parser/pragma-weak.c b/test/Parser/pragma-weak.c new file mode 100644 index 0000000000..fdc817628a --- /dev/null +++ b/test/Parser/pragma-weak.c @@ -0,0 +1,17 @@ +// RUN: clang-cc -fsyntax-only -verify %s + +// Note that this puts the expected lines before the directives to work around +// limitations in the -verify mode. + +int x; +/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak +#pragma weak x +#pragma weak y +int y; + +/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = = +/* expected-warning {{expected identifier in '#pragma weak'}}*/ #pragma weak z = +#pragma weak z = y + +/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a b +/* expected-warning {{extra tokens at end of '#pragma weak'}}*/ #pragma weak a = x c |