diff options
| author | yronglin <yronglin777@gmail.com> | 2023-05-26 07:40:51 +0800 |
|---|---|---|
| committer | yronglin <yronglin777@gmail.com> | 2023-05-26 07:41:26 +0800 |
| commit | f75b73549d4adb7e111444f4144af7bffb532f91 (patch) | |
| tree | ba1c8833f76d5bfbc77e27e6656eee5e2f77b20b /mlir/lib/Bytecode/BytecodeOpInterface.cpp | |
| parent | a2b677e8153758997a9043360cf51333eecc3c44 (diff) | |
[Clang][Attribute] Improve the AST/diagnoses fidelity of alignas and _Alignas
- Fix diagnoses when the argument to `alignas` or `_Alignas` is an incomplete type.
Before:
```
./alignas.cpp:1:15: error: invalid application of 'alignof' to an incomplete type 'void'
class alignas(void) Foo {};
~^~~~~
1 error generated.
```
Now:
```
./alignas.cpp:1:15: error: invalid application of 'alignas' to an incomplete type 'void'
class alignas(void) Foo {};
~^~~~~
1 error generated.
```
- Improve the AST fidelity of `alignas` and `_Alignas` attribute.
Before:
```
AlignedAttr 0x13f07f278 <col:7> alignas
`-ConstantExpr 0x13f07f258 <col:15, col:21> 'unsigned long'
|-value: Int 8
`-UnaryExprOrTypeTraitExpr 0x13f07f118 <col:15, col:21> 'unsigned long' alignof 'void *'
```
Now:
```
AlignedAttr 0x14288c608 <col:7> alignas 'void *'
```
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D150528
Diffstat (limited to 'mlir/lib/Bytecode/BytecodeOpInterface.cpp')
0 files changed, 0 insertions, 0 deletions
