summaryrefslogtreecommitdiffstats
path: root/clang/test/Import/switch-stmt
Commit message (Collapse)AuthorAgeFilesLines
* Compound literals, enums, et al require const exprBill Wendling2018-11-091-0/+10
| | | | | | | | | | | | | | | | | | Summary: Compound literals, enums, file-scoped arrays, etc. require their initializers and size specifiers to be constant. Wrap the initializer expressions in a ConstantExpr so that we can easily check for this later on. Reviewers: rsmith, shafik Reviewed By: rsmith Subscribers: cfe-commits, jyknight, nickdesaulniers Differential Revision: https://reviews.llvm.org/D53921 llvm-svn: 346455
* [AST] Only store the needed data in SwitchStmtBruno Ricci2018-10-291-7/+0
| | | | | | | | | | | | | | | | Don't store the data for the init statement and condition variable if not needed. This cuts the size of SwitchStmt by up to 2 pointers. The order of the children is intentionally kept the same. Also use the newly available space in the bit-fields of Stmt to store the bit representing whether all enums have been covered instead of using a PointerIntPair. Differential Revision: https://reviews.llvm.org/D53714 Reviewed By: rjmccall llvm-svn: 345510
* [AST] Check that GNU range case statements are correctly imported.Bruno Ricci2018-10-292-0/+16
| | | | | | | | | | The test for case statements did not cover GNU range case statements. Differential Revision: https://reviews.llvm.org/D53610 Reviewed By: rjmccall llvm-svn: 345506
* [AST] Don't store data for GNU range case statement if not neededBruno Ricci2018-10-281-4/+0
| | | | | | | | | | | | | | | | Don't store the data for case statements of the form LHS ... RHS if not needed. This cuts the size of CaseStmt by 1 pointer + 1 SourceLocation in the common case. Also use the newly available space in the bit-fields of Stmt to store the keyword location of SwitchCase and move the small accessor SwitchCase::getSubStmt to the header. Differential Revision: https://reviews.llvm.org/D53609 Reviewed By: rjmccall llvm-svn: 345472
* [ASTImporter] Add test for SwitchStmtRaphael Isemann2018-08-222-0/+65
Reviewers: a.sidorin, a_sidorin Reviewed By: a_sidorin Subscribers: a_sidorin, martong, cfe-commits Differential Revision: https://reviews.llvm.org/D51056 llvm-svn: 340464
OpenPOWER on IntegriCloud