[PATCH] D137415: [clang][Interp] Implement switch statements

2023-01-25 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-12-21 Thread Shafik Yaghmour via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-30 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-30 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-30 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-29 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-29 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-28 Thread Aaron Ballman via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-23 Thread Timm Bäder via Phabricator via cfe-commits
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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-04 Thread Timm Bäder via Phabricator via 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

[PATCH] D137415: [clang][Interp] Implement switch statements

2022-11-04 Thread Timm Bäder via Phabricator via cfe-commits
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