Skip to content
Open
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
a194131
[clang-tidy] Add new check `modernize-use-structured-binding`
flovent Sep 14, 2025
dd9bb2a
Update clang-tools-extra/docs/clang-tidy/checks/modernize/use-structu…
flovent Sep 14, 2025
e37026a
Update clang-tools-extra/docs/clang-tidy/checks/modernize/use-structu…
flovent Sep 14, 2025
1d01ffd
Update clang-tools-extra/docs/clang-tidy/checks/modernize/use-structu…
flovent Sep 14, 2025
4127b7b
Update clang-tools-extra/docs/clang-tidy/checks/modernize/use-structu…
flovent Sep 14, 2025
f6c129b
[NFC] Change warning message to 'use structured binding to decompose …
flovent Sep 14, 2025
24e9d4e
[NFC] Add `forRangeNotWarnCases` in test file
flovent Sep 14, 2025
08fd8db
[NFC] Remove {{^}}
flovent Sep 14, 2025
49bfcae
[NFC] Add more testcase
flovent Sep 14, 2025
aa3bf50
[NFC] Merge lambda testcase to main test file for also test c++20-or-…
flovent Sep 14, 2025
c97ce9b
[NFC] Test removed lines
flovent Sep 14, 2025
fbcb099
[NFC] 80-character for check doc
flovent Sep 14, 2025
3f95a69
[NFC] Add limitations section to doc
flovent Sep 14, 2025
a5222a2
[NFC] Add some tests about two VarDecl in one DeclStmt.
flovent Sep 14, 2025
8c423b3
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 14, 2025
42a4e5b
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 14, 2025
8919fdb
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 14, 2025
88a243e
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 14, 2025
8fa2edc
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 14, 2025
2c98065
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 14, 2025
48b747e
[NFC] Correct comment words
flovent Sep 16, 2025
a46277e
Update clang-tools-extra/docs/clang-tidy/checks/modernize/use-structu…
flovent Sep 16, 2025
36011dd
[NFC] 80 chars limit for comment
flovent Sep 16, 2025
c5c673b
Update clang-tools-extra/docs/clang-tidy/checks/modernize/use-structu…
flovent Sep 17, 2025
d92f768
[NFC] prefer static function
flovent Sep 17, 2025
e4ffb48
[NFC] Explicit capture in lambda
flovent Sep 17, 2025
73231c8
[NFC] Use llvm::twine to concat string
flovent Sep 17, 2025
7ac2a3e
[NFC] Avoid some duplications
flovent Sep 17, 2025
00285d9
Stop collecting when we got two VarDecls from DS1
flovent Sep 17, 2025
242316e
Exit for std::tie case when DS1 has multi child decl
flovent Sep 17, 2025
d2eb66b
[NFC] use llvm::reverse
flovent Sep 19, 2025
c6f6885
Refactor the way how we match Two VarDecls
flovent Sep 21, 2025
2ebab57
[NFC] Place lambda match operation to `registerMatchers`
flovent Sep 21, 2025
5bdf206
[NFC] Doc typo fix
flovent Sep 21, 2025
edac2d4
[NFC] Move init expression logic to `registerMatchers`
flovent Sep 21, 2025
0b007e8
[NFC] Rename warning message to `use a structured binding...`
flovent Sep 21, 2025
5a3799e
[NFC] cleanup
flovent Sep 21, 2025
c10eeea
Use duck-typing to get pair type
flovent Sep 21, 2025
48b7134
[NFC] Fix doc
flovent Sep 21, 2025
0607998
[NFC] Should not use auto here
flovent Sep 21, 2025
7b7ba72
[NFC] Add more tests for custom pair type
flovent Sep 21, 2025
52bc67c
[NFC] Place lambda out of loop
flovent Sep 21, 2025
d091ff4
[NFC] Iterator's name from `I` to `It`
flovent Sep 21, 2025
6d44ea0
[NFC] Add test for multi checked cases in one scope
flovent Sep 21, 2025
82dfe89
[NFC] Add testcases for pairs has qualifiers in field type.
flovent Sep 22, 2025
653233f
[NFC] Remove unnecessary comments in testcase
flovent Sep 22, 2025
09f7bcd
Update clang-tools-extra/clang-tidy/modernize/UseStructuredBindingChe…
flovent Sep 23, 2025
230df4f
[NFC] IIFE
flovent Sep 23, 2025
b02bea3
Merge branch 'main' into tidy-modernize-structured-binding
flovent Sep 26, 2025
720bc68
Ignore direct init VarDecl and add some tests
flovent Sep 29, 2025
fbbbdd5
[NFC] simplify testcase: `All` is not needed
flovent Oct 3, 2025
8d3054c
[NFC][TEST] check for remove of first declstmt
flovent Oct 3, 2025
4da01f9
[NFC][TEST] Add testcase for std::unordered_map
flovent Oct 3, 2025
611aa5d
[NFC] Remove useless outside matcher
flovent Oct 3, 2025
77113d5
[NFC] Remove unnecessary ignoreImplictCast
flovent Oct 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang-tools-extra/clang-tidy/modernize/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ add_clang_library(clangTidyModernizeModule STATIC
UseStdFormatCheck.cpp
UseStdNumbersCheck.cpp
UseStdPrintCheck.cpp
UseStructuredBindingCheck.cpp
UseTrailingReturnTypeCheck.cpp
UseTransparentFunctorsCheck.cpp
UseUncaughtExceptionsCheck.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "UseStdFormatCheck.h"
#include "UseStdNumbersCheck.h"
#include "UseStdPrintCheck.h"
#include "UseStructuredBindingCheck.h"
#include "UseTrailingReturnTypeCheck.h"
#include "UseTransparentFunctorsCheck.h"
#include "UseUncaughtExceptionsCheck.h"
Expand Down Expand Up @@ -121,6 +122,8 @@ class ModernizeModule : public ClangTidyModule {
CheckFactories.registerCheck<UseNoexceptCheck>("modernize-use-noexcept");
CheckFactories.registerCheck<UseNullptrCheck>("modernize-use-nullptr");
CheckFactories.registerCheck<UseOverrideCheck>("modernize-use-override");
CheckFactories.registerCheck<UseStructuredBindingCheck>(
"modernize-use-structured-binding");
CheckFactories.registerCheck<UseTrailingReturnTypeCheck>(
"modernize-use-trailing-return-type");
CheckFactories.registerCheck<UseTransparentFunctorsCheck>(
Expand Down
Loading
Loading