summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimm Bäder <tbaeder@redhat.com>2024-04-15 13:14:41 +0200
committerTimm Bäder <tbaeder@redhat.com>2024-04-16 12:09:49 +0200
commit31424be3aef4290dd84065b9371fcd0c5014e097 (patch)
treea1f65e8325fe2576f537f0e79d52ce38f3db172d
parent4dd5180a2d43b088d7637c30c2654f3c01c46987 (diff)
[clang][Interp][NFC] Compare std::optionals directly
-rw-r--r--clang/lib/AST/Interp/ByteCodeExprGen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index 93059edc4622..4a7b40440770 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;
}