Skip to content

Commit 47e7bdb

Browse files
committed
Test that would have caught recovery-expr crashes in 0788acb. NFC
1 parent 04ed07b commit 47e7bdb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/test/Sema/invalid-member.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %clang_cc1 -verify -fsyntax-only %s
2+
void foo(); // expected-note {{requires 0 arguments}}
3+
class X {
4+
decltype(foo(42)) invalid; // expected-error {{no matching function}}
5+
};
6+
// Should be able to evaluate sizeof without crashing.
7+
static_assert(sizeof(X) == 1, "No valid members");

0 commit comments

Comments
 (0)