projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b745c12
)
[clang][Interp][NFC] Compare std::optional variables directly
author
Timm Bäder
<tbaeder@redhat.com>
Sun, 18 Jun 2023 07:07:31 +0000
(09:07 +0200)
committer
Timm Bäder
<tbaeder@redhat.com>
Tue, 27 Jun 2023 09:36:42 +0000
(11:36 +0200)
We can do that and we already checked that they aren't nullopt before.
clang/lib/AST/Interp/ByteCodeExprGen.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/AST/Interp/ByteCodeExprGen.cpp
b/clang/lib/AST/Interp/ByteCodeExprGen.cpp
index
8558ba0
..
86200f9
100644
(file)
--- a/
clang/lib/AST/Interp/ByteCodeExprGen.cpp
+++ b/
clang/lib/AST/Interp/ByteCodeExprGen.cpp
@@
-230,7
+230,7
@@
bool ByteCodeExprGen<Emitter>::VisitBinaryOperator(const BinaryOperator *BO) {
// Pointer arithmetic special case.
if (BO->getOpcode() == BO_Add || BO->getOpcode() == BO_Sub) {
- if (
*T == PT_Ptr || (*LT == PT_Ptr && *
RT == PT_Ptr))
+ if (
T == PT_Ptr || (LT == PT_Ptr &&
RT == PT_Ptr))
return this->VisitPointerArithBinOp(BO);
}