[PATCH] D145842: [clang][Sema] Avoid duplicate diagnostics for unreachable fallthrough attribute
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Mar 12 10:59:52 PDT 2023
shafik added inline comments.
================
Comment at: clang/lib/Analysis/ReachableCode.cpp:674
+ if (AS && hasSpecificAttr<FallThroughAttr>(AS->getAttrs()) &&
+ !Diag.isIgnored(diag::warn_unreachable_fallthrough_attr,
+ SourceLocation())) {
----------------
Your passing through `DiagnosticsEngine` just to check if `diag::warn_unreachable_fallthrough_attr` is ignored. I think it would be better just to pass through a boolean flag. This would avoid one include as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145842/new/
https://reviews.llvm.org/D145842
More information about the cfe-commits
mailing list