File tree Expand file tree Collapse file tree 6 files changed +11
-13
lines changed Expand file tree Collapse file tree 6 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -91,12 +91,12 @@ void QueryCheck::check(const MatchFinder::MatchResult &Result) {
91
91
diag (Node.getSourceRange ().getBegin (), Message, Level);
92
92
}
93
93
};
94
- for (auto &[Name, Node] : Result.Nodes .getMap ())
94
+ for (const auto &[Name, Node] : Result.Nodes .getMap ())
95
95
Emit (Diags, Name, Node, DiagnosticIDs::Error);
96
- for (auto &[Name, Node] : Result.Nodes .getMap ())
96
+ for (const auto &[Name, Node] : Result.Nodes .getMap ())
97
97
Emit (Diags, Name, Node, DiagnosticIDs::Warning);
98
98
// 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 ())
100
100
Emit (Diags, Name, Node, DiagnosticIDs::Note);
101
101
}
102
102
} // namespace clang::tidy::custom
Original file line number Diff line number Diff line change 18
18
19
19
namespace clang ::tidy::custom {
20
20
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.
25
23
class QueryCheck : public ClangTidyCheck {
26
24
public:
27
25
QueryCheck (llvm::StringRef Name, const ClangTidyOptions::CustomCheckValue &V,
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ Configuration files:
61
61
globs can be specified as a list instead of a
62
62
string.
63
63
CustomChecks - Array of user defined checks based on
64
- clang-query syntax.
64
+ Clang-Query syntax.
65
65
ExcludeHeaderFilterRegex - Same as '--exclude-header-filter'.
66
66
ExtraArgs - Same as '--extra-arg'.
67
67
ExtraArgsBefore - Same as '--extra-arg-before'.
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ Introduction
8
8
This page provides examples of how to add query based custom checks for
9
9
:program: `clang-tidy `.
10
10
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.
14
14
15
15
Custom checks support inheritance from parent configurations like other
16
16
configuration items.
Original file line number Diff line number Diff line change @@ -294,7 +294,7 @@ An overview of all the command-line options:
294
294
globs can be specified as a list instead of a
295
295
string.
296
296
CustomChecks - Array of user defined checks based on
297
- clang-query syntax.
297
+ Clang-Query syntax.
298
298
ExcludeHeaderFilterRegex - Same as '--exclude-header-filter'.
299
299
ExtraArgs - Same as '--extra-arg'.
300
300
ExtraArgsBefore - Same as '--extra-arg-before'.
Original file line number Diff line number Diff line change 1
- InheritParentConfig : false
1
+ InheritParentConfig : false
You can’t perform that action at this time.
0 commit comments