[mlir][dataflow] Allow re-run all analyses in DataFlowSolver (#120881)
[llvm-project.git] / clang / test / Parser / compound-token-split.cpp
blob6b77bf386087cb6fdeb6931461ddb426977c655d
1 // RUN: %clang_cc1 %s -verify
2 // RUN: %clang_cc1 %s -verify=expected,space -Wcompound-token-split
4 // Ensure we get the same warnings after -frewrite-includes
5 // RUN: %clang_cc1 %s -E -frewrite-includes -o %t
6 // RUN: %clang_cc1 -x c++ %t -verify=expected,space -Wcompound-token-split
8 #ifdef LSQUARE
10 #else
12 #define VAR(type, name, init) type name = (init)
14 void f() {
15 VAR(int, x, {}); // #1
16 // expected-warning@#1 {{'(' and '{' tokens introducing statement expression appear in different macro expansion contexts}}
17 // expected-note-re@#1 {{{{^}}'{' token is here}}
19 // FIXME: It would be nice to suppress this when we already warned about the opening '({'.
20 // expected-warning@#1 {{'}' and ')' tokens terminating statement expression appear in different macro expansion contexts}}
21 // expected-note-re@#1 {{{{^}}')' token is here}}
23 // expected-error@#1 {{cannot initialize a variable of type 'int' with an rvalue of type 'void'}}
26 #define RPAREN )
28 int f2() {
29 int n = ({ 1; }RPAREN; // expected-warning {{'}' and ')' tokens terminating statement expression appear in different macro expansion contexts}} expected-note {{')' token is here}}
30 return n;
33 [ // space-warning-re {{{{^}}'[' tokens introducing attribute are separated by whitespace}}
34 #define LSQUARE
35 #include __FILE__
36 noreturn ]] void g();
38 [[noreturn] ] void h(); // space-warning-re {{{{^}}']' tokens terminating attribute are separated by whitespace}}
40 struct X {};
41 int X:: *p; // space-warning {{'::' and '*' tokens forming pointer to member type are separated by whitespace}}
43 #endif