blob: ceb8b985ab9dcbe3def98ec6c71d6e6fd945b96a [file] [log] [blame]
// Test that we can successfully compile this code, especially under ASAN.
// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s
// expected-no-diagnostics
struct Foo {
Foo* f;
operator bool() const { return true; }
};
constexpr Foo f((Foo[]){});
int foo() {
if (Foo(*f.f)) return 1;
return 0;
}