summaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
authorAaron Ballman <aaron@aaronballman.com>2017-12-08 02:39:26 +0000
committerAaron Ballman <aaron@aaronballman.com>2017-12-08 02:39:26 +0000
commit897706060d72e94587faeb9d3f5862875851d88b (patch)
tree788b91a7a0383cf9309e93b41ab5cebf5afbeb63 /test/Preprocessor
parent3df3793010cdb7099da1e39ea561da360dca22f4 (diff)
Add a test that the __STDC_VERSION__ macro reports the correct value for -std=c17.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/c17.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Preprocessor/c17.c b/test/Preprocessor/c17.c
new file mode 100644
index 0000000000..c610e84f98
--- /dev/null
+++ b/test/Preprocessor/c17.c
@@ -0,0 +1,4 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c17 %s
+// expected-no-diagnostics
+
+_Static_assert(__STDC_VERSION__ == 201710L, "Incorrect __STDC_VERSION__");