@@ -2560,7 +2560,9 @@ class alignas(TypeAlignment) Type : public ExtQualsTypeCommonBase {
25602560 bool isFunctionProtoType () const { return getAs<FunctionProtoType>(); }
25612561 bool isPointerType () const ;
25622562 bool isPointerOrReferenceType () const ;
2563- bool isSignableType () const ;
2563+ bool isSignableType (const ASTContext &Ctx) const ;
2564+ bool isSignablePointerType () const ;
2565+ bool isSignableIntegerType (const ASTContext &Ctx) const ;
25642566 bool isAnyPointerType () const ; // Any C pointer or ObjC object pointer
25652567 bool isCountAttributedType () const ;
25662568 bool isBlockPointerType () const ;
@@ -5976,7 +5978,6 @@ class PackIndexingType final
59765978 private llvm::TrailingObjects<PackIndexingType, QualType> {
59775979 friend TrailingObjects;
59785980
5979- const ASTContext &Context;
59805981 QualType Pattern;
59815982 Expr *IndexExpr;
59825983
@@ -5987,9 +5988,8 @@ class PackIndexingType final
59875988
59885989protected:
59895990 friend class ASTContext ; // ASTContext creates these.
5990- PackIndexingType (const ASTContext &Context, QualType Canonical,
5991- QualType Pattern, Expr *IndexExpr, bool FullySubstituted,
5992- ArrayRef<QualType> Expansions = {});
5991+ PackIndexingType (QualType Canonical, QualType Pattern, Expr *IndexExpr,
5992+ bool FullySubstituted, ArrayRef<QualType> Expansions = {});
59935993
59945994public:
59955995 Expr *getIndexExpr () const { return IndexExpr; }
@@ -6024,14 +6024,10 @@ class PackIndexingType final
60246024 return T->getTypeClass () == PackIndexing;
60256025 }
60266026
6027- void Profile (llvm::FoldingSetNodeID &ID) {
6028- if (hasSelectedType ())
6029- getSelectedType ().Profile (ID);
6030- else
6031- Profile (ID, Context, getPattern (), getIndexExpr (), isFullySubstituted ());
6032- }
6027+ void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context);
60336028 static void Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context,
6034- QualType Pattern, Expr *E, bool FullySubstituted);
6029+ QualType Pattern, Expr *E, bool FullySubstituted,
6030+ ArrayRef<QualType> Expansions);
60356031
60366032private:
60376033 const QualType *getExpansionsPtr () const {
@@ -8222,7 +8218,13 @@ inline bool Type::isAnyPointerType() const {
82228218 return isPointerType () || isObjCObjectPointerType ();
82238219}
82248220
8225- inline bool Type::isSignableType () const { return isPointerType (); }
8221+ inline bool Type::isSignableType (const ASTContext &Ctx) const {
8222+ return isSignablePointerType () || isSignableIntegerType (Ctx);
8223+ }
8224+
8225+ inline bool Type::isSignablePointerType () const {
8226+ return isPointerType () || isObjCClassType () || isObjCQualifiedClassType ();
8227+ }
82268228
82278229inline bool Type::isBlockPointerType () const {
82288230 return isa<BlockPointerType>(CanonicalType);
0 commit comments