summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/WebAssembly/non-executable-stack.ll
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-05-30 15:25:25 +0000
committerEtienne Bergeron <etienneb@google.com>2016-05-30 15:25:25 +0000
commit5500f95a00e9730256b70aca41cfa4b32da0a013 (patch)
tree1f8952fa19378261151f0f1cf06cea9a346b46a3 /llvm/test/CodeGen/WebAssembly/non-executable-stack.ll
parent1c51a2d1d487a6129f03e92dd2326c52523d4902 (diff)
downloadbcm5719-llvm-5500f95a00e9730256b70aca41cfa4b32da0a013.tar.gz
bcm5719-llvm-5500f95a00e9730256b70aca41cfa4b32da0a013.zip
[ASTMatchers] Add support of hasCondition for SwitchStmt.
Summary: The switch statement could be added to the hasCondition matcher. Example: ``` clang-query> match switchStmt(hasCondition(ignoringImpCasts(declRefExpr()))) ``` Output: ``` Match #1: Binding for "root": SwitchStmt 0x2f9b528 </usr/local/google/home/etienneb/examples/enum.cc:35:3, line:38:3> |-<<<NULL>>> |-ImplicitCastExpr 0x2f9b510 <line:35:11> 'int' <IntegralCast> | `-ImplicitCastExpr 0x2f9b4f8 <col:11> 'enum Color' <LValueToRValue> | `-DeclRefExpr 0x2f9b4d0 <col:11> 'enum Color' lvalue Var 0x2f9a118 'C' 'enum Color' `-CompoundStmt 0x2f9b610 <col:14, line:38:3> |-CaseStmt 0x2f9b578 <line:36:3, col:22> | |-ImplicitCastExpr 0x2f9b638 <col:8> 'int' <IntegralCast> | | `-DeclRefExpr 0x2f9b550 <col:8> 'enum Size' EnumConstant 0x2f99e40 'Small' 'enum Size' | |-<<<NULL>>> | `-ReturnStmt 0x2f9b5d0 <col:15, col:22> | `-IntegerLiteral 0x2f9b5b0 <col:22> 'int' 1 `-DefaultStmt 0x2f9b5f0 <line:37:3, col:12> `-BreakStmt 0x2f9b5e8 <col:12> 1 match. ``` Reviewers: aaron.ballman, sbenza, klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D20767 llvm-svn: 271208
Diffstat (limited to 'llvm/test/CodeGen/WebAssembly/non-executable-stack.ll')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud