Skip to content

Commit b56c07c

Browse files
committed
fix review
1 parent b650594 commit b56c07c

File tree

6 files changed

+11
-13
lines changed

6 files changed

+11
-13
lines changed

clang-tools-extra/clang-tidy/custom/QueryCheck.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,12 @@ void QueryCheck::check(const MatchFinder::MatchResult &Result) {
9191
diag(Node.getSourceRange().getBegin(), Message, Level);
9292
}
9393
};
94-
for (auto &[Name, Node] : Result.Nodes.getMap())
94+
for (const auto &[Name, Node] : Result.Nodes.getMap())
9595
Emit(Diags, Name, Node, DiagnosticIDs::Error);
96-
for (auto &[Name, Node] : Result.Nodes.getMap())
96+
for (const auto &[Name, Node] : Result.Nodes.getMap())
9797
Emit(Diags, Name, Node, DiagnosticIDs::Warning);
9898
// place Note last, otherwise it will not be emitted
99-
for (auto &[Name, Node] : Result.Nodes.getMap())
99+
for (const auto &[Name, Node] : Result.Nodes.getMap())
100100
Emit(Diags, Name, Node, DiagnosticIDs::Note);
101101
}
102102
} // namespace clang::tidy::custom

clang-tools-extra/clang-tidy/custom/QueryCheck.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818

1919
namespace clang::tidy::custom {
2020

21-
/// FIXME: Write a short description.
22-
///
23-
/// For the user-facing documentation see:
24-
/// http://clang.llvm.org/extra/clang-tidy/checks/custom/query.html
21+
/// Implement of Clang-Query based check.
22+
/// Not directly visible to users.
2523
class QueryCheck : public ClangTidyCheck {
2624
public:
2725
QueryCheck(llvm::StringRef Name, const ClangTidyOptions::CustomCheckValue &V,

clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Configuration files:
6161
globs can be specified as a list instead of a
6262
string.
6363
CustomChecks - Array of user defined checks based on
64-
clang-query syntax.
64+
Clang-Query syntax.
6565
ExcludeHeaderFilterRegex - Same as '--exclude-header-filter'.
6666
ExtraArgs - Same as '--extra-arg'.
6767
ExtraArgsBefore - Same as '--extra-arg-before'.

clang-tools-extra/docs/clang-tidy/QueryBasedCustomChecks.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Introduction
88
This page provides examples of how to add query based custom checks for
99
:program:`clang-tidy`.
1010

11-
Custom checks are based on clang-query syntax. Every custom checks will be
12-
registered in `custom` module to avoid name conflict. They can be enabled or
13-
disabled by the checks option like the builtin checks.
11+
Custom checks are based on :program:`clang-query` syntax. Every custom checks
12+
will be registered in `custom` module to avoid name conflict. They can be
13+
enabled or disabled by the checks option like the built-in checks.
1414

1515
Custom checks support inheritance from parent configurations like other
1616
configuration items.

clang-tools-extra/docs/clang-tidy/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ An overview of all the command-line options:
294294
globs can be specified as a list instead of a
295295
string.
296296
CustomChecks - Array of user defined checks based on
297-
clang-query syntax.
297+
Clang-Query syntax.
298298
ExcludeHeaderFilterRegex - Same as '--exclude-header-filter'.
299299
ExtraArgs - Same as '--extra-arg'.
300300
ExtraArgsBefore - Same as '--extra-arg-before'.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
InheritParentConfig: false
1+
InheritParentConfig: false

0 commit comments

Comments
 (0)