clang-tidy module: Update to build against LLVM/Clang 22

Update for LLVM/Clang commit `91cdd35008e9` ([clang] Improve nested name
specifier AST representation, 2025-08-09), which removed dedicated
`ElaboratedType` nodes in favor of storing the elaborated keyword and
name qualifier in separate nodes for the underlying type.
This commit is contained in:
Brad King
2026-05-04 19:42:07 -04:00
parent e9b6b15082
commit 2c3a9fcabe
2 changed files with 5 additions and 9 deletions
@@ -18,13 +18,10 @@ OstringstreamUseCmstrcatCheck::OstringstreamUseCmstrcatCheck(
void OstringstreamUseCmstrcatCheck::registerMatchers(MatchFinder* Finder)
{
Finder->addMatcher(
typeLoc(unless(elaboratedTypeLoc()),
optionally(hasParent(elaboratedTypeLoc().bind("parentType"))),
loc(qualType(
hasDeclaration(namedDecl(hasName("::std::ostringstream"))))))
.bind("ostringstream"),
this);
Finder->addMatcher(typeLoc(loc(qualType(hasDeclaration(
namedDecl(hasName("::std::ostringstream"))))))
.bind("ostringstream"),
this);
}
void OstringstreamUseCmstrcatCheck::check(
@@ -90,8 +90,7 @@ void UseCmsysFstreamCheck::createMatcher(StringRef StdName,
loc(usingType(throughUsingDecl(namedDecl(hasName(CmsysName)))));
Finder->addMatcher(
typeLoc(IsStd, unless(IsCmsys), unless(elaboratedTypeLoc()),
optionally(hasParent(elaboratedTypeLoc().bind("parentType"))),
typeLoc(IsStd, unless(IsCmsys),
optionally(hasParent(nestedNameSpecifierLoc().bind("parentName"))))
.bind(Bind),
this);