Author: Timm Bäder Date: 2024-04-16T12:09:49+02:00 New Revision: 31424be3aef4290dd84065b9371fcd0c5014e097
URL: https://github.com/llvm/llvm-project/commit/31424be3aef4290dd84065b9371fcd0c5014e097 DIFF: https://github.com/llvm/llvm-project/commit/31424be3aef4290dd84065b9371fcd0c5014e097.diff LOG: [clang][Interp][NFC] Compare std::optionals directly Added: Modified: clang/lib/AST/Interp/ByteCodeExprGen.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index 93059edc4622f8..4a7b40440770e3 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -1624,7 +1624,7 @@ bool ByteCodeExprGen<Emitter>::VisitCompoundAssignOperator( return false; if (!this->emitLoad(*LT, E)) return false; - if (*LT != *LHSComputationT) { + if (LT != LHSComputationT) { if (!this->emitCast(*LT, *LHSComputationT, E)) return false; } @@ -1680,7 +1680,7 @@ bool ByteCodeExprGen<Emitter>::VisitCompoundAssignOperator( } // And now cast from LHSComputationT to ResultT. - if (*ResultT != *LHSComputationT) { + if (ResultT != LHSComputationT) { if (!this->emitCast(*LHSComputationT, *ResultT, E)) return false; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits