brintos

brintos / llvm-project-archived public Read only

0
0
Text · 677 B · 766ca0f Raw
18 lines · cpp
1// RUN: %clang_cc1 %s -std=c++20 -fsyntax-only -verify2// RUN: %clang_cc1 %s -std=c++20 -fsyntax-only -verify -fno-recovery-ast3// RUN: %clang_cc1 %s -std=c++20 -fsyntax-only -verify -fexperimental-new-constant-interpreter4// RUN: %clang_cc1 %s -std=c++20 -fsyntax-only -verify -fno-recovery-ast -fexperimental-new-constant-interpreter5 6 7namespace NoCrash {8struct ForwardDecl; // expected-note {{forward declaration of}}9struct Foo {        // expected-note 2{{candidate constructor}}10  ForwardDecl f;    // expected-error {{field has incomplete type}}11};12 13constexpr Foo getFoo() {14  Foo e = 123; // expected-error {{no viable conversion from 'int' to 'Foo'}}15  return e;16}17}18