summaryrefslogtreecommitdiffstats
path: root/clang/test/Lexer
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-07-23 02:32:21 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-07-23 02:32:21 +0000
commitc7bf3805a1d9c8b9685a2953511f90dfeaee421c (patch)
treec1410e8ee0779f0cadc9a03b5d5aaf63c2534176 /clang/test/Lexer
parent6f4a165e5147293020e4c3e922f4b088d9de2f5f (diff)
downloadbcm5719-llvm-c7bf3805a1d9c8b9685a2953511f90dfeaee421c.tar.gz
bcm5719-llvm-c7bf3805a1d9c8b9685a2953511f90dfeaee421c.zip
Add -fmodules-ts flag to cc1 for the provisional C++ modules TS, and mark
'module' and 'import' as keywords when the flag is specified. llvm-svn: 276508
Diffstat (limited to 'clang/test/Lexer')
-rw-r--r--clang/test/Lexer/modules-ts.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Lexer/modules-ts.cpp b/clang/test/Lexer/modules-ts.cpp
new file mode 100644
index 00000000000..06be17c5366
--- /dev/null
+++ b/clang/test/Lexer/modules-ts.cpp
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 -fsyntax-only %s
+// RUN: %clang_cc1 -fmodules-ts -DMODULES -fsyntax-only %s
+
+#ifdef MODULES
+#define MODULES_KEYWORD(NAME) _Static_assert(!__is_identifier(NAME), #NAME)
+#else
+#define MODULES_KEYWORD(NAME) _Static_assert(__is_identifier(NAME), #NAME)
+#endif
+
+MODULES_KEYWORD(import);
+MODULES_KEYWORD(module);
OpenPOWER on IntegriCloud