Skip to content

Commit

Permalink
Test that would have caught recovery-expr crashes in 0788acb. NFC
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-mccall committed Mar 26, 2020
1 parent 04ed07b commit 47e7bdb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions clang/test/Sema/invalid-member.cpp
@@ -0,0 +1,7 @@
// RUN: %clang_cc1 -verify -fsyntax-only %s
void foo(); // expected-note {{requires 0 arguments}}
class X {
decltype(foo(42)) invalid; // expected-error {{no matching function}}
};
// Should be able to evaluate sizeof without crashing.
static_assert(sizeof(X) == 1, "No valid members");

0 comments on commit 47e7bdb

Please sign in to comment.