[PATCH] D139409: [include-cleaner] Handle dependent type members in AST

Viktoriia Bakalova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 6 02:59:07 PST 2022


VitaNuo created this revision.
Herald added a subscriber: kadircet.
Herald added a project: All.
VitaNuo requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Handles dependent type members in AST.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139409

Files:
  clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp


Index: clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
===================================================================
--- clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
+++ clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp
@@ -178,6 +178,11 @@
       "void foo() { X{}.^foo(); }");
 }
 
+TEST(WalkAST, CXXDependentScopeMemberExprs) {
+  testWalk("template<typename T> struct $explicit^Base { void method(); };",
+           "template<typename T> void k(Base<T> t) { t.^method(); }");
+}
+
 TEST(WalkAST, ConstructExprs) {
   testWalk("struct $implicit^S {};", "S ^t;");
   testWalk("struct S { $implicit^S(); };", "S ^t;");


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139409.480415.patch
Type: text/x-patch
Size: 664 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221206/03b89f74/attachment.bin>


More information about the cfe-commits mailing list