[PATCH] D148158: [include-cleaner] Handle incomplete template specializations

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 13 04:38:01 PDT 2023


kadircet added inline comments.


================
Comment at: clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp:163
               ElementsAre(Decl::ClassTemplatePartialSpecialization));
+  // Incomplete templates don't have a specific specialization associated.
+  EXPECT_THAT(testWalk(R"cpp(
----------------
sammccall wrote:
> There's no incomplete template here (did you mean `template <typename struct Foo;` or `template <typename T> struct Foo<T*>;`?)
> 
> If it's enough that the template is never instantiated then maybe it's still clearer not to provide a definition (and tweak the comment slightly?)
> If it's enough that the template is never instantiated then maybe it's still clearer not to provide a definition (and tweak the comment slightly?)

right, i meant the instantiation being "incomplete", not the template-decl itself. dropping the definition and updating the comment


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148158



More information about the cfe-commits mailing list