Depends on D103151
Details
Details
Diff Detail
Diff Detail
- Repository
 - rG LLVM Github Monorepo
 
Event Timeline
Comment Actions
Looks good, thanks!
| llvm/lib/Demangle/RustDemangle.cpp | ||
|---|---|---|
| 548–550 | This could be: bool First = true;
while (!Error && !consumeIf('E'))
  if (First)
    print(" + ");
  First = false; // this could go inside the `if` above, or not - whichever seems more readable
  ...Avoiding the increment on every iteration - I guess it'll probably optimize down to the same anyway, hopefully. So up to you if you reckon that might be more readable.  | |
This could be:
bool First = true; while (!Error && !consumeIf('E')) if (First) print(" + "); First = false; // this could go inside the `if` above, or not - whichever seems more readable ...Avoiding the increment on every iteration - I guess it'll probably optimize down to the same anyway, hopefully. So up to you if you reckon that might be more readable.