[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 00:00:17 PDT 2023
balazske added inline comments.
================
Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1697
+TEST_F(StructuralEquivalenceTemplateTest,
+ ClassTemplateEquivalentFriendClassTemplate) {
+ auto t = makeDecls<Decl>(
----------------
IgnoreTemplateParmDepth) {
================
Comment at: clang/unittests/AST/StructuralEquivalenceTest.cpp:1732
+ EXPECT_FALSE(testStructuralMatch(Friend->getFriendDecl(), get<1>(t)));
+ EXPECT_TRUE(testStructuralMatch(Friend->getFriendDecl(), get<1>(t), true));
+}
----------------
It should work with more simple code like:
```
makeDecls<ClassTemplateDecl>(
R"(
template<class> struct A;
)",
R"(
template<class> struct S {
template<class> friend struct A;
};
)",
Lang_CXX03, classTemplateDecl(hasName("A")), classTemplateDecl(hasName("A"))
);
```
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