summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/uninit-variables.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/uninit-variables.c')
-rw-r--r--clang/test/Sema/uninit-variables.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Sema/uninit-variables.c b/clang/test/Sema/uninit-variables.c
index 2398504347d..bcffbd6a3d5 100644
--- a/clang/test/Sema/uninit-variables.c
+++ b/clang/test/Sema/uninit-variables.c
@@ -391,3 +391,17 @@ int test_block_and_dead_code() {
return x; // no-warning
}
+// This previously triggered an infinite loop in the analysis.
+void PR11069(int a, int b) {
+ unsigned long flags;
+ for (;;) {
+ if (a && !b)
+ break;
+ }
+ for (;;) {
+ // This does not trigger a warning because it isn't a real use.
+ (void)(flags); // no-warning
+ }
+}
+
+
OpenPOWER on IntegriCloud