1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -check-prefix=UNINIT
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN
3 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO
5 template<typename T
> void used(T
&) noexcept
;
9 // UNINIT-LABEL: test_attribute_uninitialized(
11 // UNINIT-NEXT: call void
12 // ZERO-LABEL: test_attribute_uninitialized(
14 // ZERO-NOT: !annotation
15 // ZERO-NEXT: call void
16 // PATTERN-LABEL: test_attribute_uninitialized(
18 // PATTERN-NOT: !annotation
19 // PATTERN-NEXT: call void
20 void test_attribute_uninitialized() {
21 [[clang::uninitialized
]] int i
;
25 #pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_local))
26 // UNINIT-LABEL: test_pragma_attribute_uninitialized(
28 // UNINIT-NEXT: call void
29 // ZERO-LABEL: test_pragma_attribute_uninitialized(
31 // ZERO-NEXT: call void
32 // PATTERN-LABEL: test_pragma_attribute_uninitialized(
34 // PATTERN-NEXT: call void
35 void test_pragma_attribute_uninitialized() {
39 #pragma clang attribute pop