[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)
Baranov Victor via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 30 07:38:47 PDT 2025
================
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) {
return FD ? FD->isMain() : false;
}
+AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) {
+ const auto IsImplicitTemplateInstantiation = [](const auto *Node) {
+ return (Node != nullptr) &&
+ (Node->getTemplateSpecializationKind() == TSK_ImplicitInstantiation);
+ };
+
+ auto ParentNodes = Finder->getASTContext().getParents(Node);
+ while (!ParentNodes.empty()) {
+ const auto &ParentNode = ParentNodes[0];
----------------
vbvictor wrote:
ditto
https://github.com/llvm/llvm-project/pull/132924
More information about the cfe-commits
mailing list