summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorSerge Guelton <sguelton@redhat.com>2019-05-16 12:40:00 +0000
committerSerge Guelton <sguelton@redhat.com>2019-05-16 12:40:00 +0000
commitab155469835a90014ad42103d7d05701029a2a9b (patch)
treec63c4afdacc69d251d1d0ba7e9d186c73797a42c /clang/test
parent62650cf464de131e5164a86e43bf5963c30af134 (diff)
downloadbcm5719-llvm-ab155469835a90014ad42103d7d05701029a2a9b.tar.gz
bcm5719-llvm-ab155469835a90014ad42103d7d05701029a2a9b.zip
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
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Misc/no-warn-in-system-macro.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Misc/no-warn-in-system-macro.c b/clang/test/Misc/no-warn-in-system-macro.c
index a319b14c9c3..a351b892565 100644
--- a/clang/test/Misc/no-warn-in-system-macro.c
+++ b/clang/test/Misc/no-warn-in-system-macro.c
@@ -3,11 +3,16 @@
#include <no-warn-in-system-macro.c.inc>
+#define MACRO(x) x
+
int main(void)
{
double foo = 1.0;
if (isnan(foo))
return 1;
- return 0;
+
+ MACRO(isnan(foo));
+
+ return 0;
}
OpenPOWER on IntegriCloud