mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user