[PATCH] D128487: [ODRHash diagnostics] Move repetetive code at lambda calls into lambdas themselves. NFC.
Volodymyr Sapsai via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 28 18:51:10 PDT 2022
vsapsai added a comment.
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.
Comment at: clang/lib/Serialization/ASTReader.cpp:9827
> Unitentional change?
I believe I've clang-formatted all of it. And in https://reviews.llvm.org/D128490 I'll change this lambda into `ODRDiagsEmitter::diagnoseSubMismatchTypedef`, so it will have a different formatting.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits