Erik Pilkington | f6e7731 | 2019-02-16 01:51:19 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s |
Serge Guelton | 5ef88bd | 2019-02-01 06:11:44 +0000 | [diff] [blame] | 2 | // CHECK: warning: |
| 3 | // CHECK: expanded from macro 'ISNAN' |
| 4 | // CHECK: expanded from macro 'isnan' |
| 5 | |
| 6 | #include <warn-in-system-macro-def.c.inc> |
| 7 | |
| 8 | #define isnan(x) \ |
| 9 | (sizeof (x) == sizeof (float) \ |
| 10 | ? __isnanf (x) \ |
| 11 | : sizeof (x) == sizeof (double) \ |
| 12 | ? __isnan (x) : __isnanl (x)) |
| 13 | |
| 14 | int main(void) |
| 15 | { |
| 16 | double foo = 1.0; |
| 17 | |
| 18 | if (ISNAN(foo)) |
| 19 | return 1; |
| 20 | return 0; |
| 21 | } |