summaryrefslogtreecommitdiffstats
path: root/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Preprocessor/cxx_oper_keyword_ms_compat.cpp')
-rw-r--r--test/Preprocessor/cxx_oper_keyword_ms_compat.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp b/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
index 1c6ef90..8e1351e 100644
--- a/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
+++ b/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
@@ -1,4 +1,5 @@
-// RUN: %clang_cc1 %s -E -fms-compatibility
+// RUN: %clang_cc1 %s -E -verify -fms-extensions
+// expected-no-diagnostics
bool f() {
// Check that operators still work before redefining them.
@@ -7,6 +8,13 @@ bool f() {
#endif
}
+#ifdef and
+#endif
+
+// The second 'and' is a valid C++ operator name for '&&'.
+#if defined and and defined(and)
+#endif
+
// All c++ keywords should be #define-able in ms mode.
// (operators like "and" aren't normally, the rest always is.)
#define and
OpenPOWER on IntegriCloud