13 lines · cpp
1// Test that we can successfully compile this code, especially under ASAN.2// RUN: %clang_cc1 -verify -std=c++20 -fsyntax-only %s3// expected-no-diagnostics4struct Foo {5 Foo* f;6 operator bool() const { return true; }7};8constexpr Foo f((Foo[]){});9int foo() {10 if (Foo(*f.f)) return 1;11 return 0;12}13