diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2012-03-15 00:20:05 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2012-03-15 00:20:05 +0000 |
commit | 0e3c98951de30a129525c70bd4242739dcdb5ab5 (patch) | |
tree | 68efecf15915d80bea823744728f56b58486bf45 /test/Parser | |
parent | 8fbe3855db0c341964bb550e13659505efe06c43 (diff) |
Adding some more specific tests for enum declspec parsing, to prove that it really works.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser')
-rw-r--r-- | test/Parser/MicrosoftExtensions.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Parser/MicrosoftExtensions.c b/test/Parser/MicrosoftExtensions.c index 5f457293fa..1ef326aaf5 100644 --- a/test/Parser/MicrosoftExtensions.c +++ b/test/Parser/MicrosoftExtensions.c @@ -52,6 +52,13 @@ typedef enum E { e1 }; enum __declspec(deprecated) E2 { i, j, k }; __declspec(deprecated) enum E3 { a, b, c } e; +void deprecated_enum_test(void) +{ + // Test to make sure the deprecated warning follows the right thing + enum E2 e1; // expected-warning {{'E2' is deprecated}} + enum E3 e2; // No warning expected, the deprecation follows the variable + enum E3 e3 = e; // expected-warning {{'e' is deprecated}} +} /* Microsoft attribute tests */ [repeatable][source_annotation_attribute( Parameter|ReturnValue )] |