[PATCH] D139154: [clang-doc] Add template support

Brett Wilson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 6 10:14:23 PST 2022


brettw marked an inline comment as done.
brettw added a comment.

New patch up.



================
Comment at: clang-tools-extra/test/clang-doc/single-file.cpp:19
 // CHECK-NEXT:    DefLocation:
-// CHECK-NEXT:      LineNumber:      [[@LINE-8]]
+// CHECK-NEXT:      LineNumber:      11
 // CHECK-NEXT:      Filename:        '{{.*}}
----------------
I changed the existing test from relative line numbers which don't make sense given the structure of this (where the code is mostly static at the top, and the YAML is at the bottom which occasionally changes).


================
Comment at: clang-tools-extra/unittests/clang-doc/SerializeTest.cpp:631
 
+TEST(SerializeTests, emitFunctionTemplate) {
+  EmittedInfoList Infos;
----------------
paulkirth wrote:
> I may have missed these cases in the test file, so if they exist just ignore me.
> 
> -  a template w/ no concrete types e.g., `template<typename T> void GetFoo(T);` This seems like a very common case, so it would be good to have a test explicitly for it. 
> - a nested template, both where the inner template type is known, and where it is not.
> 
I added the nested template example to the unit test. I also added a template parameter pack to the e2e test.


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

https://reviews.llvm.org/D139154



More information about the cfe-commits mailing list