summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-10-27 03:23:10 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-10-27 03:23:10 +0000
commitd95ccd58a9fd96880c94ca995b334501738df5e8 (patch)
treed7b9821b06f2e5031fc7731678306d71b684ca88 /clang/test/Analysis
parent9ad2166899e6438c22234b4a13fd276875dd9528 (diff)
downloadbcm5719-llvm-d95ccd58a9fd96880c94ca995b334501738df5e8.tar.gz
bcm5719-llvm-d95ccd58a9fd96880c94ca995b334501738df5e8.zip
If visiting RHS causes us to finish 'Block', e.g. the RHS is a StmtExpr
containing a DoStmt, and the LHS doesn't create a new block, then we should return RBlock. Otherwise we'll incorrectly return NULL. Also relax an assertion in VisitWhileStmt(). Reset 'Block' when it is finished. llvm-svn: 117436
Diffstat (limited to 'clang/test/Analysis')
-rw-r--r--clang/test/Analysis/misc-ps-region-store.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Analysis/misc-ps-region-store.m b/clang/test/Analysis/misc-ps-region-store.m
index 4378e065365..ed285b422b4 100644
--- a/clang/test/Analysis/misc-ps-region-store.m
+++ b/clang/test/Analysis/misc-ps-region-store.m
@@ -1157,6 +1157,12 @@ pr8141 (void) {
}
}
+// Don't crash when building the CFG.
+void do_not_crash(int x) {
+ while (x - ({do {} while (0); x; })) {
+ }
+}
+
// <rdar://problem/8424269> - Handle looking at the size of a VLA in
// ArrayBoundChecker. Nothing intelligent (yet); just don't crash.
typedef struct RDar8424269_A {
OpenPOWER on IntegriCloud