summaryrefslogtreecommitdiff
path: root/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp b/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp
index 5310f2fd2538..4041c81526d2 100644
--- a/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp
+++ b/clang-tools-extra/clang-tidy/modernize/UseScopedLockCheck.cpp
@@ -28,7 +28,7 @@ static bool isLockGuardDecl(const NamedDecl *Decl) {
}
static bool isLockGuard(const QualType &Type) {
- if (const auto *Record = Type->getAs<RecordType>())
+ if (const auto *Record = Type->getAsCanonical<RecordType>())
if (const RecordDecl *Decl = Record->getOriginalDecl())
return isLockGuardDecl(Decl);
@@ -98,7 +98,7 @@ static SourceRange getLockGuardRange(const TypeSourceInfo *SourceInfo) {
// Find the exact source range of the 'lock_guard' name token
static SourceRange getLockGuardNameRange(const TypeSourceInfo *SourceInfo) {
- const TemplateSpecializationTypeLoc TemplateLoc =
+ const auto TemplateLoc =
SourceInfo->getTypeLoc().getAs<TemplateSpecializationTypeLoc>();
if (!TemplateLoc)
return {};