1 // RUN: %clang_cc1 -DSTDCPP11 -std=c++11 -verify -fsyntax-only %s 2 // RUN: %clang_cc1 -DSTDGNU11 -std=gnu++11 -verify -fsyntax-only %s 3 // RUN: %clang_cc1 -DSTDGNU11TRI -ftrigraphs -std=gnu++11 -verify -fsyntax-only %s 4 // RUN: %clang_cc1 -DSTDCPP17 -std=c++1z -verify -fsyntax-only %s 5 // RUN: %clang_cc1 -DSTDCPP17TRI -ftrigraphs -std=c++1z -verify -fsyntax-only %s 6 // RUN: %clang_cc1 -DMSCOMPAT -fms-compatibility -std=c++11 -verify -fsyntax-only %s 7 // RUN: %clang_cc1 -DNOTRI -fno-trigraphs -verify -fsyntax-only %s 8 9 void foo() { 10 #if defined(NOFLAGS) || defined(STDCPP11) || defined(STDGNU11TRI) || \ 11 defined(STDCPP17TRI) || (defined(__MVS__) && !defined(NOTRI)) 12 const char c[] = "??/n"; // expected-warning{{trigraph converted to '\' character}} 13 #elif defined(STDGNU11) || defined(STDCPP17) || defined(MSCOMPAT) || \ 14 defined(NOTRI) 15 const char c[] = "??/n"; // expected-warning{{trigraph ignored}} 16 #else 17 #error Not handled. 18 #endif 19 } 20