Lines Matching refs:_diagnose_if

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()
81 void neverwarn() _diagnose_if(N == 0 && N != 0, "oh no", "warning") {} in neverwarn()
119 void errorIf(int a) _diagnose_if(N != a, "oh no", "error") {} // expected-note{{from 'diagnose_if'}} in errorIf()
122 void warnIf(int a) _diagnose_if(N != a, "oh no", "warning") {} // expected-note{{from 'diagnose_if'… in warnIf()
134 void foo(int) _diagnose_if(1, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
138 void bar(short) _diagnose_if(1, "oh no", "error");
140 void fooArg(int a) _diagnose_if(a, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
144 void barArg(short a) _diagnose_if(a, "oh no", "error");
158 void foo(int a = 0) _diagnose_if(a, "oh no", "warning"); // expected-note 1{{from 'diagnose_if'}}
159 void bar(int a = 1) _diagnose_if(a, "oh no", "warning"); // expected-note 2{{from 'diagnose_if'}}
174 void foo(int a) _diagnose_if(a, "should warn", "warning"); // expected-note{{from 'diagnose_if'}}
175 void bar(int a) _diagnose_if(a, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
190 void foo(int i) _diagnose_if(i, "bad i", "error"); // expected-note{{from 'diagnose_if'}}
191 void bar(int i) _diagnose_if(i != T(), "bad i", "error"); // expected-note{{from 'diagnose_if'}}
193 void fooOvl(int i) _diagnose_if(i, "int bad i", "error"); // expected-note{{from 'diagnose_if'}}
194 …void fooOvl(short i) _diagnose_if(i, "short bad i", "error"); // expected-note{{from 'diagnose_if'…
196 …void barOvl(int i) _diagnose_if(i != T(), "int bad i", "error"); // expected-note{{from 'diagnose_…
197 …void barOvl(short i) _diagnose_if(i != T(), "short bad i", "error"); // expected-note{{from 'diagn…
220 void foo(int i) _diagnose_if(i, "bad i", "warning"); // expected-note{{from 'diagnose_if'}}
221 void bar(int i) _diagnose_if(i != T(), "bad i", "warning"); // expected-note{{from 'diagnose_if'}}
223 void fooOvl(int i) _diagnose_if(i, "int bad i", "warning"); // expected-note{{from 'diagnose_if'}}
224 …void fooOvl(short i) _diagnose_if(i, "short bad i", "warning"); // expected-note{{from 'diagnose_i…
226 …void barOvl(int i) _diagnose_if(i != T(), "int bad i", "warning"); // expected-note{{from 'diagnos…
227 …void barOvl(short i) _diagnose_if(i != T(), "short bad i", "warning"); // expected-note{{from 'dia…
252 void foo() _diagnose_if(1, "override me", "error"); // expected-note{{from 'diagnose_if'}}
253 void bar(int i) _diagnose_if(i, "bad i", "error"); // expected-note{{from 'diagnose_if'}}
261 void baz(int i) _diagnose_if(i, "bad i", "error"); // expected-note{{from 'diagnose_if'}}
280 void bar() _diagnose_if(foo(), "bad foo", "error"); // expected-note{{from 'diagnose_if'}}
281 void bar(int a) _diagnose_if(foo(a), "bad foo", "error"); // expected-note{{from 'diagnose_if'}}
305 …void go() const _diagnose_if(isFooable(), "oh no", "error") {} // expected-note{{from 'diagnose_if… in go()
306 …operator int() const _diagnose_if(isFooable(), "oh no", "error") { return 1; } // expected-note{{f… in operator int()
308 …void go2() const _diagnose_if(isFooable(), "oh no", "error") // expected-note{{from 'diagnose_if'}} in go2()
310 void go2() const _diagnose_if(isFooable(), "oh no", "error") {} in go2()
312 constexpr int go3() const _diagnose_if(isFooable(), "oh no", "error") in go3()
317 constexpr int go4() const _diagnose_if(isFooable(), "oh no", "error") { in go4()
320 constexpr int go4() const _diagnose_if(isFooable(), "oh no", "error") in go4()
331 void go(const Foo &f) _diagnose_if(f.isFooable(), "oh no", "error") {} // expected-note{{from 'diag… in go()
354 …template <typename T> T getVal() _diagnose_if(bad(), "oh no", "error") { // expected-note{{from 'd… in getVal()
359 …constexpr T getVal2() const _diagnose_if(bad(), "oh no", "error") { // expected-note{{from 'diagno… in getVal2()
364 …constexpr operator T() const _diagnose_if(bad(), "oh no", "error") { // expected-note{{from 'diagn… in operator T()
390 …const Bar *operator->() const _diagnose_if(bad(), "oh no", "error") { // expected-note{{from 'diag… in operator ->()
393 …void operator()() const _diagnose_if(bad(), "oh no", "error") {} // expected-note{{from 'diagnose_… in operator ()()
400 …void operator()(double) const _diagnose_if(bad(), "oh no", "error") {} // expected-note{{from 'dia… in operator ()()
401 …void operator()(int) const _diagnose_if(bad(), "oh no", "error") {} // expected-note{{from 'diagno… in operator ()()
409 …void operator()(T) const _diagnose_if(bad(), "oh no", "error") {} // expected-note 2{{from 'diagno… in operator ()()
433 auto L1 = [](int i) _diagnose_if(i, "oh no", "error") {}; // expected-note{{from 'diagnose_if'}} in runLambda()
441 …void operator[](int) _diagnose_if(i == 1, "oh no", "warning") // expected-note{{from 'diagnose_if'…
442 _diagnose_if(i == 2, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
454 void operator+() _diagnose_if(i == 1, "oh no", "warning") // expected-note{{from 'diagnose_if'}}
455 _diagnose_if(i == 2, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
465 …void operator++(int i) _diagnose_if(i == 1, "oh no", "warning") // expected-note{{from 'diagnose_i…
466 _diagnose_if(i == 2, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
482 _diagnose_if(I, "oh no", "error") { // expected-note{{from 'diagnose_if'}} in operator =()
487 _diagnose_if(I, "oh no", "error") { // expected-note{{from 'diagnose_if'}} in operator =()
494 …constexpr Bar(int I) _diagnose_if(I == 1, "oh no", "warning") // expected-note{{from 'diagnose_if'… in Bar()
495 _diagnose_if(I == 2, "oh no", "error"): I(I) {} // expected-note{{from 'diagnose_if'}} in Bar()
517 …operator const Bar &() const _diagnose_if(i, "oh no", "warning"); // expected-note{{from 'diagnose…
518 …operator const Baz &() const _diagnose_if(i, "oh no", "error"); // expected-note{{from 'diagnose_i…
532 void operator""_fn(char c)_diagnose_if(c == 1, "oh no", "warning") // expected-note{{from 'diagnose…
533 _diagnose_if(c == 2, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
544 …String(char const* __s) _diagnose_if(__s == nullptr, "oh no ptr", "warning"); // expected-note{{fr…
545 …String(int __s) _diagnose_if(__s != 0, "oh no int", "warning"); // expected-note{{from 'diagnose_i…
566 …operator size_t() const _diagnose_if(i == 1, "oh no", "warning") // expected-note{{from 'diagnose_…
567 _diagnose_if(i == 2, "oh no", "error"); // expected-note{{from 'diagnose_if'}}
593 _diagnose_if(l.size() == 1, "oh no", "warning") // expected-note{{from 'diagnose_if'}}
594 _diagnose_if(l.size() == 2, "oh no", "error") {} // expected-note{{from 'diagnose_if'}}
611 void **begin(const Foo &f) _diagnose_if(f.i, "oh no", "warning");
612 void **end(const Foo &f) _diagnose_if(f.i, "oh no", "warning");
618 void **begin(const Bar &b) _diagnose_if(b.i, "oh no", "error");
619 void **end(const Bar &b) _diagnose_if(b.i, "oh no", "error");
637 static void *operator new(size_t i) _diagnose_if(i, "oh no", "warning");
642 static void *operator new(size_t i) _diagnose_if(!i, "oh no", "warning");
658 …constexpr operator int() const _diagnose_if(i == 1, "oh no", "warning") // expected-note{{from 'di… in operator int()
659 _diagnose_if(i == 2, "oh no", "error") { // expected-note{{from 'diagnose_if'}} in operator int()