1 // RUN: %clang_cc1 -verify -fsyntax-only -fno-recovery-ast %s
2 // RUN: %clang_cc1 -verify -fsyntax-only -frecovery-ast %s
4 void foo(); // expected-note 2{{requires 0 arguments}}
6 decltype(foo(42)) invalid
; // expected-error {{no matching function}}
8 // Should be able to evaluate sizeof without crashing.
9 static_assert(sizeof(X
) == 1, "No valid members");
12 typeof(foo(42)) invalid
; // expected-error {{no matching function}}
14 // Should be able to evaluate sizeof without crashing.
15 static_assert(sizeof(Y
) == 1, "No valid members");
18 int array
[sizeof(invalid())]; // expected-error {{use of undeclared identifier}}
20 // Should be able to evaluate sizeof without crashing.
21 static_assert(sizeof(Z
) == 1, "No valid members");
23 constexpr int N
= undef
; // expected-error {{use of undeclared identifier}}
29 static_assert(sizeof(T
) == 1, "No valid members");