[PATCH] D114305: [Demangle] Add support for multiple identifiers in D qualified names

Luís Ferreira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 20 13:38:42 PST 2021


ljmf00 added inline comments.


================
Comment at: llvm/lib/Demangle/DLangDemangle.cpp:200-203
+  size_t N = 0;
+  do {
+    if (N++)
+      *Demangled << '.';
----------------
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.


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

https://reviews.llvm.org/D114305



More information about the llvm-commits mailing list