aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/unreachable-code-path.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Analysis/unreachable-code-path.c')
-rw-r--r--test/Analysis/unreachable-code-path.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Analysis/unreachable-code-path.c b/test/Analysis/unreachable-code-path.c
index ff58587be2da..effa4d9bfa6f 100644
--- a/test/Analysis/unreachable-code-path.c
+++ b/test/Analysis/unreachable-code-path.c
@@ -213,3 +213,13 @@ void macro(void) {
RETURN(1); // no-warning
}
+// Avoid FP when macro argument is known
+void writeSomething(int *x);
+#define MACRO(C) \
+ if (!C) { \
+ static int x; \
+ writeSomething(&x); \
+ }
+void macro2(void) {
+ MACRO(1);
+}