On Mon, Mar 2, 2020 at 11:42 AM Richard Smith - zygoloid via Phabricator <revi...@reviews.llvm.org> wrote: > > rsmith added a comment. > > I'm also pretty concerned about using comments to drive warning behavior. We > discussed this when first adding our gallery fallthrough warning and its > suppression mechanism and made an explicit decision that we did not want > comments to affect our behaviour. I don't think anything has changed in that > regard.
Something has changed in that regard -- GCC has shipped with the feature for several releases and third-party libraries are using it. At the time when we first discussed this, neither of those were the case that I recall. That said, if we don't want to enable comments to suppress warnings despite clang-tidy having done this for years, we should document that in the compiler internals document, back the changes out of trunk, and contact the flex maintainers to let them know we're explicitly not going to support their style of codegen. > We shouldn't enable the warning under -Wextra in language modes where there's > no standard way to suppress it. Again, this warning is not enabled under -Wextra -- you still have to explicitly enable the diagnostic. Also, there are two ways to suppress it in C: comments (in trunk) and __attribute__((fallthrough)). The issue is that the third-party libraries are generating code that contain the comments, not the attribute. ~Aaron > > > Repository: > rG LLVM Github Monorepo > > CHANGES SINCE LAST ACTION > https://reviews.llvm.org/D73852/new/ > > https://reviews.llvm.org/D73852 > > > _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits