aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CIR/CodeGen/nonzeroinit-struct.cpp
blob: 76832d1805030483ad27bb27e6642a1034af01bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// RUN: not %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o - 2>&1 | FileCheck %s

struct Other {
    int x;
};

struct Trivial {
    int x;
    double y;
    decltype(&Other::x) ptr;
};

// This case has a trivial default constructor, but can't be zero-initialized.
Trivial t;

// Since the case above isn't handled yet, we want a test that verifies that
// we're failing for the right reason.

// CHECK: error: ClangIR code gen Not Yet Implemented: tryEmitPrivateForVarInit: non-zero-initializable cxx record