mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 09:56:06 +00:00

This also clarifies some terminology used by the diagnostic (methods -> Objective-C methods, fields -> non-static data members, etc). Many of the tests needed to be updated in multiple places for the diagnostic wording tweaks. The first instance of the diagnostic for that attribute is fully specified and subsequent instances cut off the complete list (to make it easier if additional subjects are added in the future for the attribute). llvm-svn: 319002
10 lines
613 B
C++
10 lines
613 B
C++
// RUN: %clang_cc1 %s -verify -fsyntax-only -std=c++11 -x c++
|
|
void foo [[clang::xray_log_args(1)]] (int);
|
|
struct [[clang::xray_log_args(1)]] a { int x; }; // expected-warning {{'xray_log_args' attribute only applies to functions and Objective-C methods}}
|
|
|
|
void fop [[clang::xray_log_args(1)]] (); // expected-error {{'xray_log_args' attribute parameter 1 is out of bounds}}
|
|
|
|
void foq [[clang::xray_log_args(-1)]] (); // expected-error {{'xray_log_args' attribute parameter 1 is out of bounds}}
|
|
|
|
void fos [[clang::xray_log_args(0)]] (); // expected-error {{'xray_log_args' attribute parameter 1 is out of bounds}}
|