aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2012-04-07 23:09:23 +0000
committerFrancois Pichet <pichet2000@gmail.com>2012-04-07 23:09:23 +0000
commitb0afd5df3c427c329f6c5e00fe264c5bada3bf36 (patch)
tree839ff13c6195beba21911d5515a76bd3445f7c02 /test
parent073a780f7cb863cd382d1c966ef11d05c6fad075 (diff)
ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn't default to Error; otherwise MSVC headers won't parse.
Fixes PR12383. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Lexer/ms-extensions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Lexer/ms-extensions.cpp b/test/Lexer/ms-extensions.cpp
new file mode 100644
index 0000000000..7e18a6cb2b
--- /dev/null
+++ b/test/Lexer/ms-extensions.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -fsyntax-only -verify -Wreserved-user-defined-literal -fms-extensions -fms-compatibility %s
+
+#define bar(x) #x
+const char * f() {
+ return "foo"bar("bar")"baz"; /*expected-warning {{identifier after literal will be treated as a reserved user-defined literal suffix in C++11}} */
+}