[clang] [clang-tools-extra] [clang] improve class type sugar preservation in pointers to members (PR #130537)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 10 08:02:29 PDT 2025


================
@@ -3524,14 +3524,16 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode {
   QualType PointeeType;
 
   /// The class of which the pointee is a member. Must ultimately be a
-  /// RecordType, but could be a typedef or a template parameter too.
-  const Type *Class;
+  /// CXXRecordType, but could be a typedef or a template parameter too.
+  NestedNameSpecifier *Qualifier;
----------------
erichkeane wrote:

`Qualifier` is perhaps a bad choice of name here.  We use it too much to mean `cvr` qualifiers that using it here is distracting/confusing.  I'll note that `Class` was not a great name either though....  

MAYBE something like `ObjectSpecifier` or something?  BUT completely open to bikeshedding.

https://github.com/llvm/llvm-project/pull/130537


More information about the cfe-commits mailing list