[clang] 82f5bd6 - [Sema] Remove an unnecessary cast (NFC) (#152440)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 07:24:21 PDT 2025
Author: Kazu Hirata
Date: 2025-08-07T07:24:18-07:00
New Revision: 82f5bd68d03c2ef963f5e53843b1c47989dcd5d7
URL: https://github.com/llvm/llvm-project/commit/82f5bd68d03c2ef963f5e53843b1c47989dcd5d7
DIFF: https://github.com/llvm/llvm-project/commit/82f5bd68d03c2ef963f5e53843b1c47989dcd5d7.diff
LOG: [Sema] Remove an unnecessary cast (NFC) (#152440)
getScopeRep already returns NestedNameSpecifier *.
Added:
Modified:
clang/lib/Sema/SemaTemplate.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index b6b8932588909..2d8fdb5b766fc 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -367,7 +367,7 @@ bool Sema::DiagnoseUnknownTemplateName(const IdentifierInfo &II,
// The code is missing a 'template' keyword prior to the dependent template
// name.
- NestedNameSpecifier *Qualifier = (NestedNameSpecifier *)SS->getScopeRep();
+ NestedNameSpecifier *Qualifier = SS->getScopeRep();
SuggestedTemplate = TemplateTy::make(Context.getDependentTemplateName(
{Qualifier, &II, /*HasTemplateKeyword=*/false}));
Diag(IILoc, diag::err_template_kw_missing)
More information about the cfe-commits
mailing list