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) {
1000
1000
if (!visitAsPointer (RHS, *RT) || !visitAsPointer (LHS, *LT))
1001
1001
return false ;
1002
1002
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 ;
1004
1007
}
1005
1008
1006
1009
PrimType OffsetType;
Original file line number Diff line number Diff line change @@ -980,6 +980,8 @@ namespace DiscardExprs {
980
980
__uuidof (number); // both-error {{cannot call operator __uuidof on a type with no GUID}}
981
981
982
982
requires {false ;};
983
+ constexpr int *p = nullptr ;
984
+ p - p;
983
985
984
986
return 0 ;
985
987
}
You can’t perform that action at this time.
0 commit comments