[PATCH] D44668: [demangler] WIP: Add a "partial" demangling API for LLDB

Pavel Labath via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 21 03:24:56 PDT 2018


labath added a comment.

This looks great. Thank you for doing this.



================
Comment at: llvm/include/llvm/Demangle/Demangle.h:64
+  /// know this if the function has a cv or reference qualifier.
+  bool isProvablyMemberFunction() const;
+
----------------
clayborg wrote:
> erik.pilkington wrote:
> > clayborg wrote:
> > > s/provably/probably/ in comment and function name. Maybe "couldBeMemberFunction" might be a better name?
> > That wasn't a typo, this function checks if the name is for sure a non-static member function, so it conservatively returns false for `a::b()`. I suppose `isDefinitelyMemberFunction()` might be more clear.
> Maybe just "isMemberFunction()" would be clear enough? Don't think Definitely needs to be in the name.
I think that having something in the name which indicates this is just a best-effort guess is a good idea.

Alternatively, we could replace this function with something more well-defined (getFunctionQualifiers ? hasFunctionQualifiers?) and leave the business of guessing the member-ness of the function to lldb.


Repository:
  rL LLVM

https://reviews.llvm.org/D44668





More information about the llvm-commits mailing list