[libcxx-commits] [libcxxabi] [libcxxabi][ItaniumDemangle] Demangle explicitly named object parameters (PR #72881)
Emma Pilkington via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Nov 24 11:09:39 PST 2023
================
@@ -890,6 +890,29 @@ class DynamicExceptionSpec : public Node {
}
};
+/// Represents the explicitly named object parameter.
+/// E.g.,
+/// \code{.cpp}
+/// struct Foo {
+/// void bar(this Foo && self);
+/// };
+/// \endcode
+class ExplicitObjectParameter final : public Node {
+ Node *Base;
+
+public:
+ ExplicitObjectParameter(Node *Base_)
+ : Node(KExplicitObjectParameter, Cache::Yes), Base(Base_) {
+ assert(Base != nullptr);
+ }
+
+ template <typename Fn> void match(Fn F) const { F(Base); }
+
+ void printLeft(OutputBuffer &OB) const override { OB += "this "; }
----------------
epilk wrote:
I think you don't need to overload printRight, you should just be able to do: `OB += "this"; Base->print(OB);` here in printLeft (in which case you can remove the Cache::Yes just above).
https://github.com/llvm/llvm-project/pull/72881
More information about the libcxx-commits
mailing list