[clang] [clang] Remove redundant typename (NFC) (PR #167207)
via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 8 23:57:21 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-static-analyzer-1
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
Identified with readability-redundant-typename.
---
Full diff: https://github.com/llvm/llvm-project/pull/167207.diff
2 Files Affected:
- (modified) clang/include/clang/AST/DeclBase.h (+1-1)
- (modified) clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp (+1-2)
``````````diff
diff --git a/clang/include/clang/AST/DeclBase.h b/clang/include/clang/AST/DeclBase.h
index c6326a8ba506d..5519787d71f88 100644
--- a/clang/include/clang/AST/DeclBase.h
+++ b/clang/include/clang/AST/DeclBase.h
@@ -2642,7 +2642,7 @@ class DeclContext {
using udir_iterator_base =
llvm::iterator_adaptor_base<udir_iterator, lookup_iterator,
- typename lookup_iterator::iterator_category,
+ lookup_iterator::iterator_category,
UsingDirectiveDecl *>;
struct udir_iterator : udir_iterator_base {
diff --git a/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
index 3ddd6590fcbb0..68bee710e5ce5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BlockInCriticalSectionChecker.cpp
@@ -270,8 +270,7 @@ REGISTER_LIST_WITH_PROGRAMSTATE(ActiveCritSections, CritSectionMarker)
// TODO: Move these to llvm::ImmutableList when overhauling immutable data
// structures for proper iterator concept support.
template <>
-struct std::iterator_traits<
- typename llvm::ImmutableList<CritSectionMarker>::iterator> {
+struct std::iterator_traits<llvm::ImmutableList<CritSectionMarker>::iterator> {
using iterator_category = std::forward_iterator_tag;
using value_type = CritSectionMarker;
using difference_type = std::ptrdiff_t;
``````````
</details>
https://github.com/llvm/llvm-project/pull/167207
More information about the cfe-commits
mailing list