aboutsummaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp b/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp
index 0db66c0..2f54b17 100644
--- a/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp
+++ b/clang-tools-extra/clang-tidy/performance/TriviallyDestructibleCheck.cpp
@@ -24,7 +24,7 @@ AST_MATCHER(Decl, isFirstDecl) { return Node.isFirstDecl(); }
AST_MATCHER_P(CXXRecordDecl, hasBase, Matcher<QualType>, InnerMatcher) {
for (const CXXBaseSpecifier &BaseSpec : Node.bases()) {
- QualType BaseType = BaseSpec.getType();
+ const QualType BaseType = BaseSpec.getType();
if (InnerMatcher.matches(BaseType, Finder, Builder))
return true;
}
@@ -50,7 +50,7 @@ void TriviallyDestructibleCheck::check(const MatchFinder::MatchResult &Result) {
const auto *MatchedDecl = Result.Nodes.getNodeAs<CXXDestructorDecl>("decl");
// Get locations of both first and out-of-line declarations.
- SourceManager &SM = *Result.SourceManager;
+ const SourceManager &SM = *Result.SourceManager;
const auto *FirstDecl = cast<CXXMethodDecl>(MatchedDecl->getFirstDecl());
const SourceLocation FirstDeclEnd = utils::lexer::findNextTerminator(
FirstDecl->getEndLoc(), SM, getLangOpts());