summaryrefslogtreecommitdiff
path: root/test/Preprocessor
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2017-12-15 20:07:53 +0000
committerAlex Lorenz <arphaman@gmail.com>2017-12-15 20:07:53 +0000
commit817210c218310bb222f03149bfb6d23e7fd4d122 (patch)
tree503f0a335daa606d7e713c805187988d38f958e1 /test/Preprocessor
parent3adf7e6c06c9e886fbc5f33a6c786344931ca2c9 (diff)
__is_target_environment: Check the environment after parsing it
This ensures that target triples with environment versions can still work with __is_target_environment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320854 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Preprocessor')
-rw-r--r--test/Preprocessor/is_target_environment_version.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Preprocessor/is_target_environment_version.c b/test/Preprocessor/is_target_environment_version.c
new file mode 100644
index 0000000000..e93386013c
--- /dev/null
+++ b/test/Preprocessor/is_target_environment_version.c
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -triple x86_64-pc-windows-msvc18.0.0 -verify %s
+// expected-no-diagnostics
+
+#if !__is_target_environment(msvc)
+ #error "mismatching environment"
+#endif