This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf79f64b8d082: [clang][Interp] Implement inc and dec
operators (authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D136423?vs=
shafik accepted this revision.
shafik added a comment.
LGTM
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1258
+ }
+ case UO_PreDec: { // --x
+if (!this->visit(SubExpr))
You could combine this with `UO_PreInc` and just use a `bool` flag to determin
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM aside from nits.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1275-1277
+if (DiscardResult)
+ return this->emitPop(*T, E);
return thi
tbaeder updated this revision to Diff 470163.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136423/new/
https://reviews.llvm.org/D136423
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Opcodes.td
clang/test/AST/Interp/arrays.cpp
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1237-1240
+if (DiscardResult)
+ return this->emitIncPop(*T, E);
+
+return this->emitInc(*T, E);
aaron.ballman wrote:
> Style question: should we prefer doing somethin
tbaeder updated this revision to Diff 470159.
tbaeder marked 3 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136423/new/
https://reviews.llvm.org/D136423
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Opco
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1237-1240
+if (DiscardResult)
+ return this->emitIncPop(*T, E);
+
+return this->emitInc(*T, E);
Style question: should we prefer doing something like: `return D
tbaeder updated this revision to Diff 469971.
tbaeder added a comment.
Handle integer over- and underflows.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136423/new/
https://reviews.llvm.org/D136423
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Interp.h
cla
tbaeder updated this revision to Diff 469589.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136423/new/
https://reviews.llvm.org/D136423
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/Interp.h
clang/lib/AST/Interp/Opcodes.td
clang/test/AST/Interp/arrays.cpp
tbaeder updated this revision to Diff 469530.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136423/new/
https://reviews.llvm.org/D136423
Files:
clang/lib/AST/CMakeLists.txt
clang/lib/AST/ExprConstant.cpp
clang/lib/AST/Interp/Boolean.h
clang/lib/AST/Interp/ByteCodeExprGen.cpp
cl
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
This only works on integrals for now.
Add four new
11 matches
Mail list logo