@@ -4057,7 +4057,7 @@ template <class Emitter> bool Compiler<Emitter>::visitBool(const Expr *E) {
40574057 return true ;
40584058
40594059 // Convert pointers to bool.
4060- if (T == PT_Ptr || T == PT_FnPtr ) {
4060+ if (T == PT_Ptr) {
40614061 if (!this ->emitNull (*T, 0 , nullptr , E))
40624062 return false ;
40634063 return this ->emitNE (*T, E);
@@ -4103,8 +4103,6 @@ bool Compiler<Emitter>::visitZeroInitializer(PrimType T, QualType QT,
41034103 case PT_Ptr:
41044104 return this ->emitNullPtr (Ctx.getASTContext ().getTargetNullPointerValue (QT),
41054105 nullptr , E);
4106- case PT_FnPtr:
4107- return this ->emitNullFnPtr (0 , nullptr , E);
41084106 case PT_MemberPtr:
41094107 return this ->emitNullMemberPtr (0 , nullptr , E);
41104108 case PT_Float:
@@ -4255,7 +4253,6 @@ bool Compiler<Emitter>::emitConst(T Value, PrimType Ty, const Expr *E) {
42554253 case PT_Bool:
42564254 return this ->emitConstBool (Value, E);
42574255 case PT_Ptr:
4258- case PT_FnPtr:
42594256 case PT_MemberPtr:
42604257 case PT_Float:
42614258 case PT_IntAP:
@@ -4956,7 +4953,7 @@ bool Compiler<Emitter>::VisitCallExpr(const CallExpr *E) {
49564953 // If we know the callee already, check the known parametrs for nullability.
49574954 if (FuncDecl && NonNullArgs[ArgIndex]) {
49584955 PrimType ArgT = classify (Arg).value_or (PT_Ptr);
4959- if (ArgT == PT_Ptr || ArgT == PT_FnPtr ) {
4956+ if (ArgT == PT_Ptr) {
49604957 if (!this ->emitCheckNonNullArg (ArgT, Arg))
49614958 return false ;
49624959 }
@@ -5997,7 +5994,7 @@ bool Compiler<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
59975994 if (!this ->visit (SubExpr))
59985995 return false ;
59995996
6000- if (T == PT_Ptr || T == PT_FnPtr ) {
5997+ if (T == PT_Ptr) {
60015998 if (!this ->emitIncPtr (E))
60025999 return false ;
60036000
@@ -6021,7 +6018,7 @@ bool Compiler<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
60216018 if (!this ->visit (SubExpr))
60226019 return false ;
60236020
6024- if (T == PT_Ptr || T == PT_FnPtr ) {
6021+ if (T == PT_Ptr) {
60256022 if (!this ->emitDecPtr (E))
60266023 return false ;
60276024
@@ -6045,7 +6042,7 @@ bool Compiler<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
60456042 if (!this ->visit (SubExpr))
60466043 return false ;
60476044
6048- if (T == PT_Ptr || T == PT_FnPtr ) {
6045+ if (T == PT_Ptr) {
60496046 if (!this ->emitLoadPtr (E))
60506047 return false ;
60516048 if (!this ->emitConstUint8 (1 , E))
@@ -6088,7 +6085,7 @@ bool Compiler<Emitter>::VisitUnaryOperator(const UnaryOperator *E) {
60886085 if (!this ->visit (SubExpr))
60896086 return false ;
60906087
6091- if (T == PT_Ptr || T == PT_FnPtr ) {
6088+ if (T == PT_Ptr) {
60926089 if (!this ->emitLoadPtr (E))
60936090 return false ;
60946091 if (!this ->emitConstUint8 (1 , E))
0 commit comments