aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
index 3af7f8d..c862364 100644
--- a/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
+++ b/clang-tools-extra/clang-tidy/utils/NamespaceAliaser.cpp
@@ -55,7 +55,7 @@ NamespaceAliaser::createAlias(ASTContext &Context, const Stmt &Statement,
}
for (const auto &Abbreviation : Abbreviations) {
- DeclarationMatcher ConflictMatcher = namedDecl(hasName(Abbreviation));
+ const DeclarationMatcher ConflictMatcher = namedDecl(hasName(Abbreviation));
const auto HasConflictingChildren =
!match(findAll(ConflictMatcher), *Function, Context).empty();
const auto HasConflictingAncestors =
@@ -65,10 +65,10 @@ NamespaceAliaser::createAlias(ASTContext &Context, const Stmt &Statement,
if (HasConflictingAncestors || HasConflictingChildren)
continue;
- std::string Declaration =
+ const std::string Declaration =
(llvm::Twine("\nnamespace ") + Abbreviation + " = " + Namespace + ";")
.str();
- SourceLocation Loc =
+ const SourceLocation Loc =
Lexer::getLocForEndOfToken(Function->getBody()->getBeginLoc(), 0,
SourceMgr, Context.getLangOpts());
AddedAliases[Function][Namespace.str()] = Abbreviation;