[Lldb-commits] [PATCH] D140030: [lldb][TypeSystemClang][NFC] Make TemplateParameterInfos members private

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Dec 15 15:54:30 PST 2022


Michael137 added a comment.

In D140030#3999199 <https://reviews.llvm.org/D140030#3999199>, @labath wrote:

> I think that test should just be rewritten to not modify the object in such a way. Instead of cumulatively modifying a single object, it could just create a fresh one each time. That will also make it clearer what is being tested.  And I think it's fair game to add some constructors to the production object to make that easy.
>
> For example, instead of
>
>   // long sequence of manipulator operations
>   ExpectNewTemplate("<typename T, long...> (T = int, long = 1)", infos);
>
> it could do something like
>
>   ExpectNewTemplate("<typename T, long...> (T = int, long = 1)",
>     TemplateParameterInfos({{"T", intType}}, /*pack_name=*/???, /*pack=*/TemplateParameterInfos(???));

@labath good point, looks much better now. Even found a bug I introduced into the test :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140030



More information about the lldb-commits mailing list