[PATCH] D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC.

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 28 23:52:23 PDT 2022

ChuanqiXu added a comment.

In D128487#3617422 <https://reviews.llvm.org/D128487#3617422>, @vsapsai wrote:

> Thanks for the review!
> In D128487#3614251 <https://reviews.llvm.org/D128487#3614251>, @ChuanqiXu wrote:
>> Is it possible to combine the several `DiagNote` into `DiagError`? So that the code would be further reduced. I am OK to do this kind of change in other revisions.
> Do you have any immediate ideas? I have more changes in this area (see the stack), so I'm interested in improving this code. I've started thinking about some approach that has less repetition but my initial approach was using macros and it started to look pretty complicated without finishing the whole change. So I've decided that the repetitive but simple code is easier to work with than something complicated. But maybe you have some good ideas.

No immediate or concert ideas here.. It is hard to do refactoring. I sent https://reviews.llvm.org/D118437 before to do some simplification for the dispatch of default template argument. But I don't find a general method/idea to solve it in batch...

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list