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) {
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
Original file line number Diff line number Diff line change 1818
1919namespace 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.
2523class QueryCheck : public ClangTidyCheck {
2624public:
2725 QueryCheck (llvm::StringRef Name, const ClangTidyOptions::CustomCheckValue &V,
Original file line number Diff line number Diff 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'.
Original file line number Diff line number Diff line change @@ -8,9 +8,9 @@ Introduction
88This 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
1515Custom checks support inheritance from parent configurations like other
1616configuration items.
Original file line number Diff line number Diff 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'.
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