[clang] [clang] apply clang-tidy's llvm-redundant-casting (NFC) (PR #191322)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 9 18:12:09 PDT 2026
================
@@ -13889,8 +13889,8 @@ class AddressOfFunctionResolver {
// If we're in C, we need to support types that aren't exactly identical.
if (!S.getLangOpts().CPlusPlus ||
candidateHasExactlyCorrectType(FunDecl)) {
- Matches.push_back(std::make_pair(
- CurAccessFunPair, cast<FunctionDecl>(FunDecl->getCanonicalDecl())));
+ Matches.push_back(
+ std::make_pair(CurAccessFunPair, FunDecl->getCanonicalDecl()));
----------------
localspook wrote:
```suggestion
Matches.emplace_back(CurAccessFunPair, FunDecl->getCanonicalDecl());
```
https://github.com/llvm/llvm-project/pull/191322
More information about the cfe-commits
mailing list