Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Lexer / cxx1z-trigraphs.cpp
blob6b39ff6716605bf2a5b7af127436372e6b19824f
1 // RUN: %clang_cc1 -std=c++1z %s -verify
2 // RUN: %clang_cc1 -std=c++1z %s -verify -ftrigraphs -DENABLED_TRIGRAPHS=1
3 // RUN: %clang_cc1 -std=c++1z %s -verify -fno-trigraphs -DENABLED_TRIGRAPHS=0
5 #ifdef __MVS__
6 #ifndef ENABLED_TRIGRAPHS
7 #define ENABLED_TRIGRAPHS 1
8 #endif
9 #endif
11 ??= define foo ;
13 static_assert("??="[0] == '#', "");
15 // ??/
16 error here;
18 // Note, there is intentionally trailing whitespace one line below.
19 // ??/
20 error here;
22 #if !ENABLED_TRIGRAPHS
23 // expected-error@11 {{}} expected-warning@11 {{trigraph ignored}}
24 // expected-error@13 {{failed}} expected-warning@13 {{trigraph ignored}} expected-note@13 {{evaluates to ''?' (0x3F, 63) == '#' (0x23, 35)'}}
25 // expected-error@16 {{}}
26 // expected-error@20 {{}}
27 #else
28 // expected-warning@11 {{trigraph converted}}
29 // expected-warning@13 {{trigraph converted}}
30 // expected-warning@19 {{backslash and newline separated by space}}
31 #endif