Mercurial > hg > CbC > CbC_llvm
view clang/test/CodeGenCXX/trivial-auto-var-init-attribute.cpp @ 206:f17a3b42b08b
Added tag before-12 for changeset b7591485f4cd
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Jun 2021 21:25:57 +0900 |
parents | 0572611fdcc8 |
children | 2e18cbf3894f |
line wrap: on
line source
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks %s -emit-llvm -o - | FileCheck %s -check-prefix=UNINIT // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=pattern %s -emit-llvm -o - | FileCheck %s -check-prefix=PATTERN // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fblocks -ftrivial-auto-var-init=zero %s -emit-llvm -o - | FileCheck %s -check-prefix=ZERO template<typename T> void used(T &) noexcept; extern "C" { // UNINIT-LABEL: test_attribute_uninitialized( // UNINIT: alloca // UNINIT-NEXT: call void // ZERO-LABEL: test_attribute_uninitialized( // ZERO: alloca // ZERO-NEXT: call void // PATTERN-LABEL: test_attribute_uninitialized( // PATTERN: alloca // PATTERN-NEXT: call void void test_attribute_uninitialized() { [[clang::uninitialized]] int i; used(i); } #pragma clang attribute push([[clang::uninitialized]], apply_to = variable(is_local)) // UNINIT-LABEL: test_pragma_attribute_uninitialized( // UNINIT: alloca // UNINIT-NEXT: call void // ZERO-LABEL: test_pragma_attribute_uninitialized( // ZERO: alloca // ZERO-NEXT: call void // PATTERN-LABEL: test_pragma_attribute_uninitialized( // PATTERN: alloca // PATTERN-NEXT: call void void test_pragma_attribute_uninitialized() { int i; used(i); } #pragma clang attribute pop } // extern "C"