[PATCH] D91895: [Clang] avoid -Wimplicit-fallthrough for fallthrough to break
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 20 14:55:42 PST 2020
nickdesaulniers added inline comments.
================
Comment at: clang/lib/Sema/AnalysisBasedWarnings.cpp:1156
+ const CFGBlock::AdjacentBlock &Succ = *P->succ_begin();
+ const Stmt *Term = B.getTerminatorStmt();
+ if (Succ->size() == 0 && Term && isa<BreakStmt>(Term))
----------------
ah, we want `Succ`'s terminator stmt, not B's.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91895/new/
https://reviews.llvm.org/D91895
More information about the cfe-commits
mailing list