Commit 817c832
authored
[clang] Improve source location in binary type traits diagnostics (#88097)
This patch takes advantage of a recent NFC change that refactored
`EvaluateBinaryTypeTrait()` to accept `TypeSourceInfo` instead of
`QualType` c7db450.
Before:
```
test2.cpp:105:55: error: variable length arrays are not supported in '__is_layout_compatible'
105 | static_assert(!__is_layout_compatible(int[n], int[n]));
| ^
test2.cpp:125:76: error: incomplete type 'CStructIncomplete' where a complete type is required
125 | static_assert(__is_layout_compatible(CStructIncomplete, CStructIncomplete));
| ^
```
After:
```
test2.cpp:105:41: error: variable length arrays are not supported in '__is_layout_compatible'
105 | static_assert(!__is_layout_compatible(int[n], int[n]));
| ^
test2.cpp:125:40: error: incomplete type 'CStructIncomplete' where a complete type is required
125 | static_assert(__is_layout_compatible(CStructIncomplete, CStructIncomplete));
| ^
```1 parent 6c40d46 commit 817c832
2 files changed
+23
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5895 | 5895 | | |
5896 | 5896 | | |
5897 | 5897 | | |
5898 | | - | |
| 5898 | + | |
| 5899 | + | |
5899 | 5900 | | |
5900 | 5901 | | |
5901 | 5902 | | |
| |||
5918 | 5919 | | |
5919 | 5920 | | |
5920 | 5921 | | |
5921 | | - | |
5922 | | - | |
| 5922 | + | |
| 5923 | + | |
| 5924 | + | |
5923 | 5925 | | |
5924 | 5926 | | |
5925 | 5927 | | |
| |||
5971 | 5973 | | |
5972 | 5974 | | |
5973 | 5975 | | |
5974 | | - | |
| 5976 | + | |
| 5977 | + | |
5975 | 5978 | | |
5976 | 5979 | | |
5977 | 5980 | | |
| |||
6021 | 6024 | | |
6022 | 6025 | | |
6023 | 6026 | | |
6024 | | - | |
6025 | | - | |
| 6027 | + | |
| 6028 | + | |
| 6029 | + | |
6026 | 6030 | | |
6027 | 6031 | | |
6028 | | - | |
6029 | | - | |
| 6032 | + | |
| 6033 | + | |
| 6034 | + | |
6030 | 6035 | | |
6031 | 6036 | | |
6032 | 6037 | | |
| |||
6081 | 6086 | | |
6082 | 6087 | | |
6083 | 6088 | | |
6084 | | - | |
| 6089 | + | |
| 6090 | + | |
6085 | 6091 | | |
6086 | | - | |
| 6092 | + | |
| 6093 | + | |
6087 | 6094 | | |
6088 | | - | |
6089 | | - | |
| 6095 | + | |
| 6096 | + | |
| 6097 | + | |
| 6098 | + | |
| 6099 | + | |
6090 | 6100 | | |
6091 | 6101 | | |
6092 | 6102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1759 | 1759 | | |
1760 | 1760 | | |
1761 | 1761 | | |
| 1762 | + | |
1762 | 1763 | | |
1763 | 1764 | | |
1764 | 1765 | | |
| |||
0 commit comments