[Lldb-commits] [PATCH] D54074: CPlusPlusLanguage: Use new demangler API to implement type substitution
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 5 14:13:36 PST 2018
shafik added inline comments.
================
Comment at: source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp:336
+ llvm::itanium_demangle::Node *parseType() {
+ if (llvm::StringRef(First, Last - First).startswith(Search)) {
+ Result += llvm::StringRef(Written, First - Written);
----------------
Can you just use `numLeft()` here? It would be less opaque.
================
Comment at: source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp:337
+ if (llvm::StringRef(First, Last - First).startswith(Search)) {
+ Result += llvm::StringRef(Written, First - Written);
+ Result += Replace;
----------------
also `First - Written` is used twice but it is not obvious what the means, naming it via a member function might be helpful.
https://reviews.llvm.org/D54074
More information about the lldb-commits
mailing list