1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -fallow-editor-placeholders -DSUPPRESS -verify %s
6 void method(Struct
&x
);
9 struct <#struct name#> {
12 // expected-error@-3 {{editor placeholder in source file}}
13 // expected-error@-3 {{editor placeholder in source file}}
17 typename
<#typename#>::<#name#>;
18 decltype(<#expression#>) foobar;
19 typedef <#type#> <#name#>;
21 // expected-error@-4 2 {{editor placeholder in source file}}
22 // expected-error@-4 {{editor placeholder in source file}}
23 // expected-error@-4 2 {{editor placeholder in source file}}
26 namespace <#identifier#> {
29 // expected-error@-3 {{editor placeholder in source file}}
30 // expected-error@-3 {{editor placeholder in source file}}
35 using <#qualifier#>::<#name#>;
37 // expected-error@-2 2 {{editor placeholder in source file}}
40 void avoidPlaceholderErrors(Struct
&obj
) {
41 static_cast< <#type#> >(<#expression#>);
42 while (<#condition#>) {
45 obj
.method(<#Struct &x#>);
47 // expected-error@-6 2 {{editor placeholder in source file}}
48 // expected-error@-6 {{editor placeholder in source file}}
49 // expected-error@-6 {{editor placeholder in source file}}
50 // expected-error@-5 {{editor placeholder in source file}}
52 switch (<#expression#>) {
56 // expected-error@-4 {{editor placeholder in source file}}
57 // expected-error@-4 {{editor placeholder in source file}}
58 // expected-error@-4 {{editor placeholder in source file}}
67 void Struct::method(<#Struct &x#>, noSupressionHere) { // expected-error {{unknown type name 'noSupressionHere'}}
69 // expected-error@-2 {{editor placeholder in source file}}
73 void handleTrigraph() {
74 <??=placeholder
#> // expected-error {{expected expression}} expected-error {{expected expression}} expected-warning {{trigraph converted to '#' character}}