34 lines · cpp
1// RUN: %clang_cc1 %s -verify 2 3void foo() {4 // expected-error@+1{{an attribute list cannot appear here}}5__attribute__((aligned(64)))6#pragma clang attribute push(__attribute__((uninitialized)), apply_to = any(variable(is_local)))7{8 int f;9}10#pragma clang attribute pop11}12 13void foo2() {14 // expected-error@+1{{an attribute list cannot appear here}}15__attribute__((aligned(64)))16#pragma clang __debug dump foo17}18 19void foo3() {20 // expected-error@+1{{an attribute list cannot appear here}}21 [[nodiscard]]22#pragma clang attribute push(__attribute__((uninitialized)), apply_to = any(variable(is_local)))23{24 int f;25}26#pragma clang attribute pop27}28 29void foo4() {30 // expected-error@+1{{an attribute list cannot appear here}}31 [[nodiscard]]32#pragma clang __debug dump foo33}34