This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG024e4f16ca79: [clang][Interp] Implement switch statements
(authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D137415?vs=4788
shafik added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:405
+ const Expr *Cond = S->getCond();
+ PrimType CondT = this->classifyPrim(Cond->getType());
+
The condition could be a class type w/ a conversion operator, this does not
seem
aaron.ballman accepted this revision.
aaron.ballman added inline comments.
This revision is now accepted and ready to land.
Comment at: clang/test/AST/Interp/switch.cpp:46
+constexpr int withInit() {
+ switch(int a = 2; a) {
+case 1: return -1;
tbaeder wrote
tbaeder marked an inline comment as done.
tbaeder added inline comments.
Comment at: clang/test/AST/Interp/switch.cpp:46
+constexpr int withInit() {
+ switch(int a = 2; a) {
+case 1: return -1;
aaron.ballman wrote:
> I think it would be good to add a non-tri
tbaeder updated this revision to Diff 478895.
tbaeder marked 2 inline comments as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137415/new/
https://reviews.llvm.org/D137415
Files:
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/Interp/ByteCodeStmtGen.h
clang/test/AST/I
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:423
+ // Create labels and comparison ops for all case statements.
+ for (const SwitchCase *SC = S->getSwitchCaseList(); SC;
+ SC = SC->getNextSwitchCase()) {
tbaede
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:423
+ // Create labels and comparison ops for all case statements.
+ for (const SwitchCase *SC = S->getSwitchCaseList(); SC;
+ SC = SC->getNextSwitchCase()) {
aaron.ballma
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeStmtGen.cpp:423
+ // Create labels and comparison ops for all case statements.
+ for (const SwitchCase *SC = S->getSwitchCaseList(); SC;
+ SC = SC->getNextSwitchCase()) {
How we
tbaeder added a comment.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137415/new/
https://reviews.llvm.org/D137415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaeder updated this revision to Diff 473212.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137415/new/
https://reviews.llvm.org/D137415
Files:
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/Interp/ByteCodeStmtGen.h
clang/test/AST/Interp/switch.cpp
Index: clang/test/AST/In
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 creates a temporary local variable for the con
11 matches
Mail list logo