1 // RUN: %clang_cc1 -fsyntax-only -std=gnu11 -verify=supported %s
2 // RUN: %clang_cc1 -fsyntax-only -std=c11 -DUNICODE -fraw-string-literals -verify=supported %s
3 // RUN: %clang_cc1 -fsyntax-only -std=gnu89 -verify=unsupported %s
4 // RUN: %clang_cc1 -fsyntax-only -std=c11 -DUNICODE -verify=unsupported %s
5 // RUN: %clang_cc1 -fsyntax-only -std=gnu11 -DUNICODE -fno-raw-string-literals -verify=unsupported %s
7 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=c++03 -verify=unsupported,cxx-unsupported %s
8 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=gnu++03 -verify=unsupported,cxx-unsupported %s
9 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=c++03 -fraw-string-literals -verify=supported %s
10 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=gnu++03 -fraw-string-literals -verify=supported %s
11 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=c++11 -DUNICODE -verify=supported,cxx %s
12 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=gnu++11 -DUNICODE -verify=supported,cxx %s
13 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=c++11 -DUNICODE -fraw-string-literals -verify=supported,yes %s
14 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=gnu++11 -DUNICODE -fraw-string-literals -verify=supported,yes %s
15 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=c++11 -DUNICODE -fno-raw-string-literals -verify=supported,no %s
16 // RUN: %clang_cc1 -x c++ -fsyntax-only -Wno-unused -std=gnu++11 -DUNICODE -fno-raw-string-literals -verify=supported,no %s
18 // GCC supports raw string literals in C99 and later in '-std=gnuXY' mode; we
19 // additionally provide '-f[no-]raw-string-literals' to enable/disable them
22 // We do not allow disabling raw string literals in C++ mode if they’re enabled
23 // by the language standard, i.e. in C++11 or later.
26 // yes-warning@* {{ignoring '-fraw-string-literals'}}
27 // no-warning@* {{ignoring '-fno-raw-string-literals'}}
30 (void) R
"foo()foo"; // unsupported-error {{use of undeclared identifier 'R'}} cxx-unsupported-error {{expected ';' after expression}}
31 (void) LR
"foo()foo"; // unsupported-error {{use of undeclared identifier 'LR'}} cxx-unsupported-error {{expected ';' after expression}}
34 (void) uR
"foo()foo"; // unsupported-error {{use of undeclared identifier 'uR'}} cxx-unsupported-error {{expected ';' after expression}}
35 (void) u8R
"foo()foo"; // unsupported-error {{use of undeclared identifier 'u8R'}} cxx-unsupported-error {{expected ';' after expression}}
36 (void) UR
"foo()foo"; // unsupported-error {{use of undeclared identifier 'UR'}} cxx-unsupported-error {{expected ';' after expression}}
40 // supported-error@* {{missing terminating delimiter}}
41 // supported-error@* {{expected expression}}
42 // supported-error@* {{expected ';' after top level declarator}}
44 const char* s
= R
"foo(";