llvm-project/clang/test/Sema/xray-always-instrument-attr.cpp
Oleksandr T. 2e8e254d18
[Clang] include attribute scope in diagnostics (#144619)
This patch updates diagnostics to print fully qualified attribute names,
including scope when present.
2025-07-08 11:36:52 +03:00

11 lines
489 B
C++

// RUN: %clang_cc1 %s -verify -fsyntax-only -std=c++11 -x c++
void foo [[clang::xray_always_instrument]] ();
struct [[clang::xray_always_instrument]] a { int x; }; // expected-warning {{'clang::xray_always_instrument' attribute only applies to functions and Objective-C methods}}
class b {
void c [[clang::xray_always_instrument]] ();
};
void baz [[clang::xray_always_instrument("not-supported")]] (); // expected-error {{'clang::xray_always_instrument' attribute takes no arguments}}