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
5
6 struct A {
7 A(int);
8 int k;
9 };
10
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;
17 };
18
19 // SRCLOC-DAG: @{{.+}} = private unnamed_addr global {{.+}} @.src, i32 [[@LINE+1]], i32 10 }
B()20 B::B() : A(1) {}
21
foo()22 void foo() {
23 B b(2);
24 // SRCLOC-DAG: @{{.+}} = private unnamed_addr global {{.+}} @.src, i32 [[@LINE+1]], i32 5 }
25 ^{b.f();}();
26 }
27