}
if (const auto *Loc = Result.Nodes.getNodeAs<TypeLoc>("typeLoc")) {
+ UnqualTypeLoc Unqual = Loc->getUnqualifiedLoc();
NamedDecl *Decl = nullptr;
- if (const auto &Ref = Loc->getAs<TagTypeLoc>())
+ if (const auto &Ref = Unqual.getAs<TagTypeLoc>())
Decl = Ref.getDecl();
- else if (const auto &Ref = Loc->getAs<InjectedClassNameTypeLoc>())
+ else if (const auto &Ref = Unqual.getAs<InjectedClassNameTypeLoc>())
Decl = Ref.getDecl();
- else if (const auto &Ref = Loc->getAs<UnresolvedUsingTypeLoc>())
+ else if (const auto &Ref = Unqual.getAs<UnresolvedUsingTypeLoc>())
Decl = Ref.getDecl();
- else if (const auto &Ref = Loc->getAs<TemplateTypeParmTypeLoc>())
+ else if (const auto &Ref = Unqual.getAs<TemplateTypeParmTypeLoc>())
Decl = Ref.getDecl();
// further TypeLocs handled below
inline reference_wrapper<const Up>
cref(const Up &u) noexcept {
// CHECK-MESSAGES: :[[@LINE-1]]:16: warning: declaration uses identifier 'u', which is not a reserved identifier [bugprone-reserved-identifier]
- // CHECK-FIXES: {{^}}cref(const Up &__u) noexcept {{{$}}
+ // CHECK-FIXES: {{^}}cref(const _Up &__u) noexcept {{{$}}
return reference_wrapper<const Up>(u);
}
using namespace FOO_NS::InlineNamespace;
// CHECK-FIXES: {{^}}using namespace foo_ns::inline_namespace;
+
+void QualifiedTypeLocTest(THIS___Structure);
+// CHECK-FIXES: {{^}}void QualifiedTypeLocTest(this_structure);{{$}}
+void QualifiedTypeLocTest(THIS___Structure &);
+// CHECK-FIXES: {{^}}void QualifiedTypeLocTest(this_structure &);{{$}}
+void QualifiedTypeLocTest(THIS___Structure &&);
+// CHECK-FIXES: {{^}}void QualifiedTypeLocTest(this_structure &&);{{$}}
+void QualifiedTypeLocTest(const THIS___Structure);
+// CHECK-FIXES: {{^}}void QualifiedTypeLocTest(const this_structure);{{$}}
+void QualifiedTypeLocTest(const THIS___Structure &);
+// CHECK-FIXES: {{^}}void QualifiedTypeLocTest(const this_structure &);{{$}}
+void QualifiedTypeLocTest(volatile THIS___Structure &);
+// CHECK-FIXES: {{^}}void QualifiedTypeLocTest(volatile this_structure &);{{$}}