This revision was automatically updated to reflect the committed changes.
tbaeder marked an inline comment as done.
Closed by commit rG5a859432f317: [clang][Interp] Implement while and do-while
loops (authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D135433?vs=466259&id=4
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:293
+ LabelTy CondLabel = this->getLabel(); // Label before the condition.
+ LabelTy EndLabel = thi
shafik added inline comments.
Comment at: clang/test/AST/Interp/loops.cpp:9
+
+namespace WhileLoop {
+ constexpr int f() {
tbaeder wrote:
> shafik wrote:
> > infinite loop w/o a side effect are undefined behavior and so should be
> > ill-formed and generate a d
tbaeder added inline comments.
Comment at: clang/test/AST/Interp/loops.cpp:9
+
+namespace WhileLoop {
+ constexpr int f() {
shafik wrote:
> infinite loop w/o a side effect are undefined behavior and so should be
> ill-formed and generate a diagnostic e.g. `whil
shafik added inline comments.
Comment at: clang/test/AST/Interp/loops.cpp:9
+
+namespace WhileLoop {
+ constexpr int f() {
infinite loop w/o a side effect are undefined behavior and so should be
ill-formed and generate a diagnostic e.g. `while(1);`, so we shoul
tbaeder updated this revision to Diff 466259.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135433/new/
https://reviews.llvm.org/D135433
Files:
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/Interp/ByteCodeStmtGen.h
clang/test/AST/Interp/loops.cpp
Index: clang/test/AST/Int
tbaeder added inline comments.
Comment at: clang/test/AST/Interp/loops.cpp:93
+ }
+ static_assert(f4() == 5, "");
+};
aaron.ballman wrote:
> Can you also add some tests that use nested loops with multiple levels of
> `break` and `continue` use?
>
> Also, I th
aaron.ballman added inline comments.
Comment at: clang/test/AST/Interp/loops.cpp:93
+ }
+ static_assert(f4() == 5, "");
+};
Can you also add some tests that use nested loops with multiple levels of
`break` and `continue` use?
Also, I think it might be useful
tbaeder updated this revision to Diff 466022.
tbaeder added a comment.
Add `break` and `continue` support as well.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135433/new/
https://reviews.llvm.org/D135433
Files:
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/Interp/ByteCod
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, shafik, tahonermann.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
I was wondering whether it is somehow possible to g
10 matches
Mail list logo