Skip to content

Commit 082c976

Browse files
committed
reinstate FIXME as it was not fixed
Signed-off-by: Justin Stitt <[email protected]>
1 parent 037fc58 commit 082c976

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/Sema/AnalysisBasedWarnings.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2754,6 +2754,9 @@ static void emitPossiblyUnreachableDiags(Sema &S, AnalysisDeclContext &AC,
27542754
const auto &D = *I;
27552755
if (llvm::all_of(D.Stmts, [&](const Stmt *St) {
27562756
const CFGBlock *Block = AC.getBlockForRegisteredExpression(St);
2757+
// FIXME: We should be able to assert that block is non-null, but
2758+
// the CFG analysis can skip potentially-evaluated expressions in
2759+
// edge cases; see test/Sema/vla-2.c.
27572760
if (Block && Analysis)
27582761
if (!Analysis->isReachable(&AC.getCFG()->getEntry(), Block))
27592762
return false;

0 commit comments

Comments
 (0)