Adding some more specific tests for enum declspec parsing, to prove that it really works.

llvm-svn: 152757
This commit is contained in:
Aaron Ballman 2012-03-15 00:20:05 +00:00
parent a733297fa6
commit c42d838d9f
1 changed files with 7 additions and 0 deletions

View File

@ -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 )]