Debian Codegraph @

clang/test/CIR/CodeGen/nonzeroinit-struct.cpp

raw
1 // RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - 2>&1 | FileCheck %s
2
3 struct Other {
4 int x;
5 };
6
7 struct Trivial {
8 int x;
9 double y;
10 decltype(&Other::x) ptr;
11 };
12
13 // This case has a trivial default constructor, but can't be zero-initialized.
14 Trivial t;
15
16 // Since the case above isn't handled yet, we want a test that verifies that
17 // we're failing for the right reason.
18
19 // CHECK: error: ClangIR code gen Not Yet Implemented: tryEmitPrivateForVarInit: non-zero-initializable cxx record