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)