[Lldb-commits] [PATCH] D70721: [lldb/cpluspluslanguage] Add constructor substitutor

Shafik Yaghmour via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 4 09:32:43 PST 2019


shafik accepted this revision.
shafik added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp:352
+  void appendUnchangedInput() {
+    Result += llvm::StringRef(Written, this->First - Written);
+    Written = this->First;
----------------
labath wrote:
> shafik wrote:
> > `this->First - Written` feels awkward, I feel like given the names they should be reversed :-(
> Yeah, it's a bit weird, but I'm not sure what to do about it.. do you have any specific suggestion? `std::distance(Written, First)` ? adding a member function like `currentParserPos()` to wrap the `First`?
Yes, I think `currentParserPos()` would be helpful, it would at least clarify the intent and it makes it more obvious it is doing the correct thing.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70721





More information about the lldb-commits mailing list