diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-09-15 07:01:20 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-09-15 07:01:20 +0000 |
commit | 8f3b834471b158d65d490e3458fa16ba659ec105 (patch) | |
tree | 009c086206c26867f73da1f3fba2334d6d8ce695 /lib/Analysis | |
parent | 53a4d7e4f315eab2315e01e8a81037c8d7df6c0c (diff) |
Relax assertion in CFG builder when processing ForStmts. This fixes an assertion failure
on code containing GNU statement expressions reported in PR 8141.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113953 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/CFG.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/CFG.cpp b/lib/Analysis/CFG.cpp index e297ec4856..cc3a388862 100644 --- a/lib/Analysis/CFG.cpp +++ b/lib/Analysis/CFG.cpp @@ -991,7 +991,8 @@ CFGBlock* CFGBuilder::VisitForStmt(ForStmt* F) { if (Stmt* C = F->getCond()) { Block = ExitConditionBlock; EntryConditionBlock = addStmt(C); - assert(Block == EntryConditionBlock); + assert(Block == EntryConditionBlock || + (Block == 0 && EntryConditionBlock == Succ)); // If this block contains a condition variable, add both the condition // variable and initializer to the CFG. |