brintos

brintos / llvm-project-archived public Read only

0
0
Text · 639 B · 540dd5f Raw
15 lines · cpp
1// RUN: %clang_cc1 %s -verify -fsyntax-only2// RUN: %clang_cc1 %s -verify -fsyntax-only -x c3 4#ifdef __cplusplus5int a __attribute__((standalone_debug)); // expected-warning {{'standalone_debug' attribute only applies to classes}}6 7void __attribute__((standalone_debug)) b(); // expected-warning {{'standalone_debug' attribute only applies to classes}}8 9struct __attribute__((standalone_debug(1))) c {}; // expected-error {{'standalone_debug' attribute takes no arguments}}10 11#else12// Check that attribute only works in C++.13struct __attribute__((standalone_debug)) a {}; // expected-warning {{'standalone_debug' attribute ignored}}14#endif15