Searched refs:_diagnose_if (Results 1 – 4 of 4) sorted by relevance
/external/llvm-project/clang/test/Sema/ |
D | diagnose_if.c | 3 #define _diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) macro 5 void failure() _diagnose_if(); // expected-error{{exactly 3 arguments}} 6 void failure() _diagnose_if(0); // expected-error{{exactly 3 arguments}} 7 void failure() _diagnose_if(0, ""); // expected-error{{exactly 3 arguments}} 8 void failure() _diagnose_if(0, "", "error", 1); // expected-error{{exactly 3 arguments}} 9 void failure() _diagnose_if(0, 0, "error"); // expected-error{{requires a string}} 10 void failure() _diagnose_if(0, "", "invalid"); // expected-error{{invalid diagnostic type for 'diag… 11 void failure() _diagnose_if(0, "", "ERROR"); // expected-error{{invalid diagnostic type}} 12 void failure(int a) _diagnose_if(a, "", ""); // expected-error{{invalid diagnostic type}} 13 void failure() _diagnose_if(a, "", ""); // expected-error{{undeclared identifier 'a'}} [all …]
|
/external/llvm-project/clang/test/SemaCXX/ |
D | diagnose_if.cpp | 3 #define _diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) macro 9 void neverok() _diagnose_if(!T(), "oh no", "error") {} // expected-note 4{{from 'diagnose_if'}} in neverok() 12 void alwaysok() _diagnose_if(T(), "oh no", "error") {} in alwaysok() 15 void alwayswarn() _diagnose_if(!T(), "oh no", "warning") {} // expected-note 4{{from 'diagnose_if'}} in alwayswarn() 18 void neverwarn() _diagnose_if(T(), "oh no", "warning") {} in neverwarn() 56 void errorIf(T a) _diagnose_if(T() != a, "oh no", "error") {} // expected-note{{from 'diagnose_if'}} in errorIf() 59 void warnIf(T a) _diagnose_if(T() != a, "oh no", "warning") {} // expected-note{{from 'diagnose_if'… in warnIf() 72 void neverok() _diagnose_if(N == 0 || N != 0, "oh no", "error") {} // expected-note 4{{from 'diagno… in neverok() 75 void alwaysok() _diagnose_if(N == 0 && N != 0, "oh no", "error") {} in alwaysok() 78 void alwayswarn() _diagnose_if(N == 0 || N != 0, "oh no", "warning") {} // expected-note 4{{from 'd… in alwayswarn() [all …]
|
D | operator-new-size-diagnose_if.cpp | 5 #define _diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) macro 10 …static void *operator new(size_t i) _diagnose_if(i == sizeof(int), "yay", "warning"); // expected-… 15 …static void *operator new[](size_t i) _diagnose_if(i == 8 * sizeof(int), "yay", "warning"); // exp…
|
/external/llvm-project/clang/test/SemaObjC/ |
D | diagnose_if.m | 5 #define _diagnose_if(...) __attribute__((diagnose_if(__VA_ARGS__))) macro 8 -(void)meth _diagnose_if(1, "don't use this", "warning"); // expected-note 1{{from 'diagnose_if'}} method 9 @property (assign) id prop _diagnose_if(1, "don't use this", "warning"); // expected-note 2{{from '… property
|