[PATCH] D103364: [Demangle][Rust] Parse dyn-trait-assoc-binding
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 1 16:44:27 PDT 2021
dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.
Looks good - couple of optional things.
================
Comment at: llvm/lib/Demangle/RustDemangle.cpp:228
+ if (LeaveOpen)
+ IsOpen = true;
+ else
----------------
Might be simpler to early return true here - skip the `IsOpen` variable - since this is the one place that can return true? (and return false at the end of the function)
================
Comment at: llvm/lib/Demangle/RustDemangle.cpp:567
void Demangler::demangleDynTrait() {
- demanglePath(InType::Yes);
- // FIXME demangle {<dyn-trait-assoc-binding>}
+ bool IsOpen = demanglePath(InType::Yes, true /* LeaveOpen */);
+ while (!Error && consumeIf('p')) {
----------------
Could use another enum here for "LeaveOpen" to avoid the need to comment call sites?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103364/new/
https://reviews.llvm.org/D103364
More information about the llvm-commits
mailing list