summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/warn-unreachable.c
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2013-02-05 22:00:19 +0000
committerTed Kremenek <kremenek@apple.com>2013-02-05 22:00:19 +0000
commit8ae67871b4eaa41c6e9077aeb7208044f56f80a7 (patch)
tree91217ebad057a6462e5265d6fce1708d42ecf1d5 /clang/test/Sema/warn-unreachable.c
parent44a40ca1433ed3aa8ff783a6ac545de9e03ec22b (diff)
downloadbcm5719-llvm-8ae67871b4eaa41c6e9077aeb7208044f56f80a7.tar.gz
bcm5719-llvm-8ae67871b4eaa41c6e9077aeb7208044f56f80a7.zip
Change subexpressions to be visited in the CFG from left-to-right.
This is a more natural order of evaluation, and it is very important for visualization in the static analyzer. Within Xcode, the arrows will not jump from right to left, which looks very visually jarring. It also provides a more natural location for dataflow-based diagnostics. Along the way, we found a case in the analyzer diagnostics where we needed to indicate that a variable was "captured" by a block. -fsyntax-only timings on sqlite3.c show no visible performance change, although this is just one test case. Fixes <rdar://problem/13016513> llvm-svn: 174447
Diffstat (limited to 'clang/test/Sema/warn-unreachable.c')
-rw-r--r--clang/test/Sema/warn-unreachable.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/warn-unreachable.c b/clang/test/Sema/warn-unreachable.c
index 2fbe1c78eb2..fd74b5c8717 100644
--- a/clang/test/Sema/warn-unreachable.c
+++ b/clang/test/Sema/warn-unreachable.c
@@ -80,8 +80,8 @@ void test2() {
- // expected-warning {{will never be executed}}
halt();
case 8:
- i // expected-warning {{will never be executed}}
- +=
+ i
+ += // expected-warning {{will never be executed}}
halt();
case 9:
halt()
@@ -93,8 +93,8 @@ void test2() {
case 11: {
int a[5];
live(),
- a[halt() // expected-warning {{will never be executed}}
- ];
+ a[halt()
+ ]; // expected-warning {{will never be executed}}
}
}
}
OpenPOWER on IntegriCloud