[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / Frontend / trigraphs.cpp
blobf65ad10b8eb7039cbd5c01d3bede51e2ca0c2233
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
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