Missing size for typedef
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
At least in some situations, the database can wind up with a `Type` with no size, even though that `Type` is for a `typedef` whose underlying type has a known size. This caused bad IR generation, although that was fixable by always using the size of the unspecified type.
To repro, run the following query on the LGTM database for g/nlohmann/json:
```ql
private import cpp
from Type t, Type ut, int size
where ut = t.getUnspecifiedType() and size = ut.getSize() and not exists(t.getSize())
select t, ut, size
```
Expected Result:
No results
Actual Result:
~871 types for which there is no size, despite the unspecified type having a size
I was unable to come up with a small repro in a QL test, so it might be tricky to debug.
貢獻指南
評估
這個 Issue 還沒有評估資料。