[PATCH] D114305: [Demangle] Add support for multiple identifiers in D qualified names
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 21 18:20:03 PST 2021
dblaikie added inline comments.
================
Comment at: llvm/lib/Demangle/DLangDemangle.cpp:200-203
+ size_t N = 0;
+ do {
+ if (N++)
+ *Demangled << '.';
----------------
ljmf00 wrote:
> dblaikie wrote:
> > Might be more legible to write this as:
> > ```
> > bool First = true;
> > do {
> > if (First)
> > *Demangled << '.';
> > First = false;
> > Mangled = parseIdentifier...
> > ```
> > Rather than incrementing `N` which is rather non-descript.
> Yeah, that's is better and more performant, although I think you meant the other way around although. The intention here is to add dot on every iteration other than the first.
Right right!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114305/new/
https://reviews.llvm.org/D114305
More information about the llvm-commits
mailing list