distinguish between the true and false branches for path-sensitive analyses.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68185
91177308-0d34-0410-b5e6-
96231b3b80d8
Block = NULL;
ThenBlock = Visit(Then);
- if (!ThenBlock) // Can occur when the Then body has all NullStmts.
- ThenBlock = sv.get();
+ if (!ThenBlock) {
+ // We can reach here if the "then" body has all NullStmts.
+ // Create an empty block so we can distinguish between true and false
+ // branches in path-sensitive analyses.
+ ThenBlock = createBlock(false);
+ ThenBlock->addSuccessor(sv.get());
+ }
else if (Block)
FinishBlock(ThenBlock);
}