File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1000,7 +1000,10 @@ bool Compiler<Emitter>::VisitPointerArithBinOp(const BinaryOperator *E) {
10001000 if (!visitAsPointer (RHS, *RT) || !visitAsPointer (LHS, *LT))
10011001 return false ;
10021002
1003- return this ->emitSubPtr (classifyPrim (E->getType ()), E);
1003+ PrimType IntT = classifyPrim (E->getType ());
1004+ if (!this ->emitSubPtr (IntT, E))
1005+ return false ;
1006+ return DiscardResult ? this ->emitPop (IntT, E) : true ;
10041007 }
10051008
10061009 PrimType OffsetType;
Original file line number Diff line number Diff line change @@ -980,6 +980,8 @@ namespace DiscardExprs {
980980 __uuidof (number); // both-error {{cannot call operator __uuidof on a type with no GUID}}
981981
982982 requires {false ;};
983+ constexpr int *p = nullptr ;
984+ p - p;
983985
984986 return 0 ;
985987 }
You can’t perform that action at this time.
0 commit comments