aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/custom/QueryCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/custom/QueryCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/custom/QueryCheck.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/custom/QueryCheck.cpp b/clang-tools-extra/clang-tidy/custom/QueryCheck.cpp
index f83c138f..315ce58 100644
--- a/clang-tools-extra/clang-tidy/custom/QueryCheck.cpp
+++ b/clang-tools-extra/clang-tidy/custom/QueryCheck.cpp
@@ -33,7 +33,7 @@ parseQuery(const ClangTidyOptions::CustomCheckValue &V,
clang::query::QuerySession QS({});
llvm::StringRef QueryStringRef{V.Query};
while (!QueryStringRef.empty()) {
- query::QueryRef Q = query::QueryParser::parse(QueryStringRef, QS);
+ const query::QueryRef Q = query::QueryParser::parse(QueryStringRef, QS);
switch (Q->Kind) {
case query::QK_Match: {
const auto &MatchQuery = llvm::cast<query::MatchQuery>(*Q);
@@ -126,11 +126,11 @@ void QueryCheck::registerMatchers(MatchFinder *Finder) {
void QueryCheck::check(const MatchFinder::MatchResult &Result) {
auto Emit = [this](const DiagMaps &DiagMaps, const std::string &BindName,
const DynTypedNode &Node, DiagnosticIDs::Level Level) {
- DiagMaps::const_iterator DiagMapIt = DiagMaps.find(Level);
+ const DiagMaps::const_iterator DiagMapIt = DiagMaps.find(Level);
if (DiagMapIt == DiagMaps.end())
return;
const BindNameMapToDiagMessage &BindNameMap = DiagMapIt->second;
- BindNameMapToDiagMessage::const_iterator BindNameMapIt =
+ const BindNameMapToDiagMessage::const_iterator BindNameMapIt =
BindNameMap.find(BindName);
if (BindNameMapIt == BindNameMap.end())
return;