[cfe-commits] r152757 - /cfe/trunk/test/Parser/MicrosoftExtensions.c

Aaron Ballman aaron at aaronballman.com
Wed Mar 14 17:20:06 PDT 2012


Author: aaronballman
Date: Wed Mar 14 19:20:05 2012
New Revision: 152757

URL: http://llvm.org/viewvc/llvm-project?rev=152757&view=rev
Log:
Adding some more specific tests for enum declspec parsing, to prove that it really works.

Modified:
    cfe/trunk/test/Parser/MicrosoftExtensions.c

Modified: cfe/trunk/test/Parser/MicrosoftExtensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/MicrosoftExtensions.c?rev=152757&r1=152756&r2=152757&view=diff
==============================================================================
--- cfe/trunk/test/Parser/MicrosoftExtensions.c (original)
+++ cfe/trunk/test/Parser/MicrosoftExtensions.c Wed Mar 14 19:20:05 2012
@@ -52,6 +52,13 @@
 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 )]





More information about the cfe-commits mailing list