1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++17 %s
3 // Ensure that we don't crash if errors are suppressed by an error limit.
4 // RUN: not %clang_cc1 -fsyntax-only -std=c++17 -ferror-limit=1 %s
6 error e
; // expected-error {{unknown type name}}
10 Bar
<int> *variables_to_modify
;
11 foo() { // expected-error {{a type specifier is required for all declarations}}
12 for (auto *c
: *variables_to_modify
)
19 struct X
; // expected-note {{forward declaration}}
20 for (X x
// expected-error {{incomplete type}}
21 : a
) { // expected-error {{range expression of type 'int'}}
22 constexpr int n
= sizeof(x
);
25 struct S
{ int x
, y
; };
26 for (S
[x
, y
] // expected-error {{must be 'auto'}}
27 : a
) { // expected-error {{range expression}}
28 typename
decltype(x
)::a b
;