[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)
Ilya Biryukov via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 3 07:06:04 PST 2025
================
@@ -2672,7 +3055,7 @@ static inline std::optional<FixItList> createDataFixit(const ASTContext &Ctx,
// `DRE.data()`
std::optional<FixItList>
UPCStandalonePointerGadget::getFixits(const FixitStrategy &S) const {
- const auto VD = cast<VarDecl>(Node->getDecl());
+ const auto *const VD = cast<VarDecl>(Node->getDecl());
----------------
ilya-biryukov wrote:
NIT: do we actually need `const auto* const`? Looks very heavy for the reader.
`const auto*` or `auto*` seem like better choices.
https://github.com/llvm/llvm-project/pull/125492
More information about the cfe-commits
mailing list