diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-08-24 22:33:53 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2018-08-24 22:33:53 +0000 |
commit | 55857c5bed5fc97dd468606b2f0615c445e3fa60 (patch) | |
tree | bc3ff71368b8fc541f330e05625f63994cf15945 | |
parent | 2ae8468bd1cc177b72c54de3108653e173ca2d23 (diff) | |
download | bcm5719-llvm-55857c5bed5fc97dd468606b2f0615c445e3fa60.tar.gz bcm5719-llvm-55857c5bed5fc97dd468606b2f0615c445e3fa60.zip |
Add documentation comment to ForwardTemplateReference.
This node doesn't directly correspond to a mangled name fragment, so
it's useful to explicitly describe when it's created and what it's for.
llvm-svn: 340664
-rw-r--r-- | llvm/include/llvm/Demangle/ItaniumDemangle.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/include/llvm/Demangle/ItaniumDemangle.h b/llvm/include/llvm/Demangle/ItaniumDemangle.h index af717b35a7c..d74f83e0c31 100644 --- a/llvm/include/llvm/Demangle/ItaniumDemangle.h +++ b/llvm/include/llvm/Demangle/ItaniumDemangle.h @@ -1118,6 +1118,24 @@ public: } }; +/// A forward-reference to a template argument that was not known at the point +/// where the template parameter name was parsed in a mangling. +/// +/// This is created when demangling the name of a specialization of a +/// conversion function template: +/// +/// \code +/// struct A { +/// template<typename T> operator T*(); +/// }; +/// \endcode +/// +/// When demangling a specialization of the conversion function template, we +/// encounter the name of the template (including the \c T) before we reach +/// the template argument list, so we cannot substitute the parameter name +/// for the corresponding argument while parsing. Instead, we create a +/// \c ForwardTemplateReference node that is resolved after we parse the +/// template arguments. struct ForwardTemplateReference : Node { size_t Index; Node *Ref = nullptr; |