================
@@ -2838,6 +2838,18 @@ class alignas(TypeAlignment) Type : public
ExtQualsTypeCommonBase {
/// immediately following this class.
template <typename T> const T *getAs() const;
+ /// Look through sugar for an instance of TemplateSpecializationType which
+ /// is not a type alias.
+ const TemplateSpecializationType *
+ getAsNonAliasTemplateSpecializationType() const;
+
+ const TemplateSpecializationType *
+ castAsNonAliasTemplateSpecializationType() const {
+ auto TST = getAsNonAliasTemplateSpecializationType();
----------------
erichkeane wrote:
Yep, I think I'm just kind of complaining about the names :) But I think it
makes reasonable sense in this form, though I'd probably insist on a better
descriptive comment on them to make it clear what is happening.
Typically, we are 'trying' to get rid of the non-template `getAs`/`castAs`
functions and change them to specializations, but we sorta stopped on that
(just due to effort). So naming two new ones like that that we would want to
KEEP is going backwards.
https://github.com/llvm/llvm-project/pull/135916
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits