llvm-project/clang/test/Misc/no-warn-in-system-macro.c
Serge Guelton ab15546983 Fix isInSystemMacro in presence of macro and pasted token
When a warning is raised from the expansion of a system macro that
involves pasted token, there was still situations were they were not
skipped, as showcased by this issue:
https://bugzilla.redhat.com/show_bug.cgi?id=1472437

Differential Revision: https://reviews.llvm.org/D59413

llvm-svn: 360885
2019-05-16 12:40:00 +00:00

19 lines
302 B
C

// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s
// CHECK-NOT: warning:
#include <no-warn-in-system-macro.c.inc>
#define MACRO(x) x
int main(void)
{
double foo = 1.0;
if (isnan(foo))
return 1;
MACRO(isnan(foo));
return 0;
}