From f46b672a7afffe7af7175ad9b57ffab3aa862e96 Mon Sep 17 00:00:00 2001 From: YazZz1k Date: Wed, 24 Jan 2024 15:11:46 +0300 Subject: [PATCH] add lit test --- clang/test/CIR/CodeGen/ctor-srcloc-fix.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 clang/test/CIR/CodeGen/ctor-srcloc-fix.cpp diff --git a/clang/test/CIR/CodeGen/ctor-srcloc-fix.cpp b/clang/test/CIR/CodeGen/ctor-srcloc-fix.cpp new file mode 100644 index 000000000000..df461e3974ad --- /dev/null +++ b/clang/test/CIR/CodeGen/ctor-srcloc-fix.cpp @@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -fclangir-enable -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s + +struct e { e(int); }; +e *g = new e(0); + +//CHECK: {{%.*}} = cir.const(#cir.int<1> : !u64i) : !u64i loc(#loc11) +//CHECK: {{%.*}} = cir.call @_Znwm(%1) : (!u64i) -> !cir.ptr loc(#loc6)