[PATCH] D145842: [clang][Sema] Avoid duplicate diagnostics for unreachable fallthrough attribute
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 13 12:32:43 PDT 2023
aaron.ballman added a comment.
Thank you, I think this is heading in the right direction! Can you also add a release note to `clang/docs/ReleaseNotes.rst` about the fix?
================
Comment at: clang/lib/Analysis/ReachableCode.cpp:633-635
+ const AttributedStmt *AS = dyn_cast<AttributedStmt>(S);
+ bool HasFallThroughAttr =
+ AS && hasSpecificAttr<FallThroughAttr>(AS->getAttrs());
----------------
NFC, just a stylistic choice.
Alternatively: change `const AttributedStmt *AS = ...` into `const auto *AS = ...`
================
Comment at: clang/lib/Analysis/ReachableCode.cpp:722
}
-
}} // end namespace clang::reachable_code
----------------
Accidental whitespace change?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145842/new/
https://reviews.llvm.org/D145842
More information about the cfe-commits
mailing list