Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / ubsan-ctor-srcloc.cpp
blobda27a668cf6255c02c68963631f903275ec5ec6f
1 // RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux -emit-llvm -fsanitize=alignment -fblocks %s -o %t.ll
2 // RUN: FileCheck -check-prefix=ZEROINIT < %t.ll %s
3 // RUN: FileCheck -check-prefix=SRCLOC < %t.ll %s
4 // ZEROINIT-NOT: @{{.+}} = private unnamed_addr global {{.+}} zeroinitializer
6 struct A {
7 A(int);
8 int k;
9 };
11 struct B : A {
12 B();
13 B(const B &);
14 // SRCLOC-DAG: @{{.+}} = private unnamed_addr global {{.+}} @.src, i32 [[@LINE+1]], i32 12 }
15 using A::A;
16 void f() const;
19 // SRCLOC-DAG: @{{.+}} = private unnamed_addr global {{.+}} @.src, i32 [[@LINE+1]], i32 10 }
20 B::B() : A(1) {}
22 void foo() {
23 B b(2);
24 // SRCLOC-DAG: @{{.+}} = private unnamed_addr global {{.+}} @.src, i32 [[@LINE+1]], i32 5 }
25 ^{b.f();}();