aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp b/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
index 8b197e5b..1a6ff30 100644
--- a/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
+++ b/clang-tools-extra/clang-tidy/abseil/UpgradeDurationConversionsCheck.cpp
@@ -117,10 +117,10 @@ void UpgradeDurationConversionsCheck::check(
"implicit conversion to 'int64_t' is deprecated in this context; use an "
"explicit cast instead";
- TraversalKindScope RAII(*Result.Context, TK_AsIs);
+ const TraversalKindScope RAII(*Result.Context, TK_AsIs);
const auto *ArgExpr = Result.Nodes.getNodeAs<Expr>("arg");
- SourceLocation Loc = ArgExpr->getBeginLoc();
+ const SourceLocation Loc = ArgExpr->getBeginLoc();
const auto *OuterExpr = Result.Nodes.getNodeAs<Expr>("OuterExpr");
@@ -139,13 +139,13 @@ void UpgradeDurationConversionsCheck::check(
// We gather source locations from template matches not in template
// instantiations for future matches.
- internal::Matcher<Stmt> IsInsideTemplate =
+ const internal::Matcher<Stmt> IsInsideTemplate =
hasAncestor(decl(anyOf(classTemplateDecl(), functionTemplateDecl())));
if (!match(IsInsideTemplate, *ArgExpr, *Result.Context).empty())
MatchedTemplateLocations.insert(Loc);
- DiagnosticBuilder Diag = diag(Loc, Message);
- CharSourceRange SourceRange = Lexer::makeFileCharRange(
+ const DiagnosticBuilder Diag = diag(Loc, Message);
+ const CharSourceRange SourceRange = Lexer::makeFileCharRange(
CharSourceRange::getTokenRange(ArgExpr->getSourceRange()),
*Result.SourceManager, Result.Context->getLangOpts());
if (SourceRange.isInvalid())