[PATCH] D156693: [clang][ASTImporter]Skip check depth of friend template parameter

Balázs Kéri via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 01:12:48 PDT 2023


balazske added inline comments.


================
Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1709
+      classTemplateDecl(hasName("A")));
+  EXPECT_TRUE(testStructuralMatch(t));
+  EXPECT_TRUE(testStructuralMatch(t, true));
----------------
The intent was to have `EXPECT_FALSE` without ignore depth, and the next test would be not needed. If it does not work with this code a different code can be found. The depth of the (unnamed) template parameter is really different in these cases too, but it is probably not detected by structural equivalence. Maybe `template<int U>` or `template<class T, T U>` is needed. But to document this behavior the current test can be added too, with name `IgnoreTemplateParmDepthAtTemplateTypeParmDecl`, and the new one with name `IgnoreTemplateParmDepthAtNonTypeTemplateParmDecl`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156693/new/

https://reviews.llvm.org/D156693



More information about the cfe-commits mailing list