summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2014-06-20 19:23:57 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2014-06-20 19:23:57 +0000
commit0b795c57e5759ed77c8f4a5509317dcdf71b6735 (patch)
tree6a898bc34446e3de40522c5a2900e43a49393924 /test
parentd282252b652c8ef8a45ffb6a06c29da83be53d16 (diff)
downloadclang-0b795c57e5759ed77c8f4a5509317dcdf71b6735.tar.gz
clang-0b795c57e5759ed77c8f4a5509317dcdf71b6735.tar.bz2
clang-0b795c57e5759ed77c8f4a5509317dcdf71b6735.tar.xz
[C++1z] Implement N3981: Disable trigraphs by default in C++1z mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Lexer/cxx1z-trigraphs.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Lexer/cxx1z-trigraphs.cpp b/test/Lexer/cxx1z-trigraphs.cpp
new file mode 100644
index 0000000000..410626fd7b
--- /dev/null
+++ b/test/Lexer/cxx1z-trigraphs.cpp
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -std=c++1z %s -verify
+// RUN: %clang_cc1 -std=c++1z %s -trigraphs -fsyntax-only
+
+??= define foo ; // expected-error {{}} expected-warning {{trigraph ignored}}
+
+static_assert("??="[0] == '#', ""); // expected-error {{failed}} expected-warning {{trigraph ignored}}
+
+// ??/
+error here; // expected-error {{}}