1 #line 1 "tests/SkScalar.h"
2 // This checks that the whitelist accounts for #line directives and such. If you
3 // remove SkScalar from the whitelist, please change the filename here instead
4 // of adding expected diagnostics.
headerSays(double x)5 inline int headerSays(double x) {
6   return x != x;
7 }
8 #line 9 "TestNANTestingExpr.cpp"
9 void test(bool x);
foo()10 void foo() {
11   float f, f2;
12   typedef double mydouble;
13   mydouble d;
14   double d2;
15   test(f == f); // expected-error{{comparing a floating point value to itself for NaN checking can lead to incorrect results}} expected-note{{consider using mozilla::IsNaN instead}}
16   test(d == d); // expected-error{{comparing a floating point value to itself for NaN checking can lead to incorrect results}} expected-note{{consider using mozilla::IsNaN instead}}
17   test(f != f); // expected-error{{comparing a floating point value to itself for NaN checking can lead to incorrect results}} expected-note{{consider using mozilla::IsNaN instead}}
18   test(d != d); // expected-error{{comparing a floating point value to itself for NaN checking can lead to incorrect results}} expected-note{{consider using mozilla::IsNaN instead}}
19   test(f != d);
20   test(d == (d - f));
21   test(f == f2);
22   test(d == d2);
23   test(d + 1 == d);
24 }
25