diff options
author | flovent <flbven@protonmail.com> | 2025-10-12 14:18:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-12 14:18:02 +0800 |
commit | 4d29460b43e7826300b396a1ff30e5069f42c56c (patch) | |
tree | f8fe42ccfb20ce785df8876dc2522b97a905fdc1 /mlir/test/Integration/Dialect | |
parent | a5e30f835097d6b210bb7896e6a4dad77b5b4742 (diff) | |
download | llvm-main.zip llvm-main.tar.gz llvm-main.tar.bz2 |
For `CompoundAssignOperator` in condition, there will be two layers of
`ImplicitCastExpr`, for code:
```
int val = -1;
while(val >>= 7) {
}
```
While statement's AST:
```
WhileStmt <line:4:5, line:5:5>
|-ImplicitCastExpr <line:4:11, col:18> 'bool' <IntegralToBoolean>
| `-ImplicitCastExpr <col:11, col:18> 'int' <LValueToRValue>
| `-CompoundAssignOperator <col:11, col:18> 'int' lvalue '>>=' ComputeLHSTy='int' ComputeResultTy='int'
| |-DeclRefExpr <col:11> 'int' lvalue Var 0x20290cb8 'val' 'int'
| `-IntegerLiteral <col:18> 'int' 7
`-CompoundStmt <col:21, line:5:5>
```
This is not taken into account by the check when determining whether
brackets need to be added.
Closes #161318.
Diffstat (limited to 'mlir/test/Integration/Dialect')
0 files changed, 0 insertions, 0 deletions