arphaman added a comment. I looked at the way `HasFallthroughStmt` is used, and it didn't seem so, no. It's used in the following manner in AnalysisBasedWarnings.cpp:
bool FallThroughDiagFull = !Diags.isIgnored(diag::warn_unannotated_fallthrough, D->getLocStart()); bool FallThroughDiagPerFunction = !Diags.isIgnored( diag::warn_unannotated_fallthrough_per_function, D->getLocStart()); if (FallThroughDiagFull || FallThroughDiagPerFunction || fscope->HasFallthroughStmt) { DiagnoseSwitchLabelsFallthrough(S, AC, !FallThroughDiagFull); } So it seems to me that even if `HasFallthroughStmt` isn't cleared, the analysis won't show up anything different for a function that re-used the scope info, because when diagnostics are ignored and the flag actually leads to incorrect call to `DiagnoseSwitchLabelsFallthrough `, the analysis won't show any warnings since the diagnostics are ignored. And likewise if one of the diagnostics is enabled then it doesn't matter if `HasFallthroughStmt` is true, so we won't be able to observe a difference there. https://reviews.llvm.org/D22770 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits