This revision changes the representation of assertion information from a tuple to a struct. Assertion information is collected from 'assert' statements.
It makes the code easier to read.
Differential D100854
[TableGen] Change assertion information from a tuple to a struct [NFC] Paul-C-Anagnostopoulos on Apr 20 2021, 7:26 AM. Authored by
Details This revision changes the representation of assertion information from a tuple to a struct. Assertion information is collected from 'assert' statements. It makes the code easier to read.
Diff Detail Event Timeline
Comment Actions (also a bunch of clang-format auto-comments on this review, please run this change through clang-format-patch or however else you like to do it to address those comments)
Comment Actions I have incorporated the lint changes and David's suggestions. @dblaikie: Could you explain more about what I should say about the AssertionInfo constructor? I don't understand what you meant about the constructor and make_unique(). Comment Actions Oh, something like // user-defined dtor to support std::make_unique, can be removed in C++20 where braced init is supported
|
Could add a comment saying this ctor is here only so you can use make_unique (& I think C++20 will make this work without a user-defined/declared ctor like this (when we eventually adopt C++20, which is a long way off))
Alternatively, since there's only one make_unique, might be just as well to skip the ctor and have the construction code do this:
(maybe also with a comment there about why make_unique here until C++20 due to the lack of a ctor)