r320131 - Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 7 18:39:26 PST 2017


Author: aaronballman
Date: Thu Dec  7 18:39:26 2017
New Revision: 320131

URL: http://llvm.org/viewvc/llvm-project?rev=320131&view=rev
Log:
Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17.

Added:
    cfe/trunk/test/Preprocessor/c17.c

Added: cfe/trunk/test/Preprocessor/c17.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/c17.c?rev=320131&view=auto
==============================================================================
--- cfe/trunk/test/Preprocessor/c17.c (added)
+++ cfe/trunk/test/Preprocessor/c17.c Thu Dec  7 18:39:26 2017
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c17 %s
+// expected-no-diagnostics
+
+_Static_assert(__STDC_VERSION__ == 201710L, "Incorrect __STDC_VERSION__");




More information about the cfe-commits mailing list