diff --git a/Utilities/ClangTidyModule/OstringstreamUseCmstrcatCheck.cxx b/Utilities/ClangTidyModule/OstringstreamUseCmstrcatCheck.cxx index 8265e329be..801c9f6ab8 100644 --- a/Utilities/ClangTidyModule/OstringstreamUseCmstrcatCheck.cxx +++ b/Utilities/ClangTidyModule/OstringstreamUseCmstrcatCheck.cxx @@ -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( diff --git a/Utilities/ClangTidyModule/UseCmsysFstreamCheck.cxx b/Utilities/ClangTidyModule/UseCmsysFstreamCheck.cxx index 5f28054223..cf75bfc344 100644 --- a/Utilities/ClangTidyModule/UseCmsysFstreamCheck.cxx +++ b/Utilities/ClangTidyModule/UseCmsysFstreamCheck.cxx @@ -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);