There is a mapping issue between InitListExpr inits and RecordDecl's fields when dealing with Unnamed bitfields. Indeed, those are only used for padding, and thus are not appearing in InitlistExpr inits, which means we can off-by-one the fields to inits mapping while initializing struct's fields.
Details
Details
Diff Detail
Diff Detail
- Repository
- rC Clang
Unit Tests
Unit Tests
Event Timeline
clang/lib/Analysis/FlowSensitive/Transfer.cpp | ||
---|---|---|
739 | Is there a better way to do this? I tried using llvm::make_filter_range instead, but it didn't seem to work well with llvm::zip... |
Comment Actions
Thanks for this fix! Would you mind expanding the description a bit? I had trouble understanding the details of the problem that is being addressed. Thanks!
clang/lib/Analysis/FlowSensitive/Transfer.cpp | ||
---|---|---|
735 | Please comment indicating why you're dropping the unnamed bit fields. | |
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp | ||
5101 | Please add comment explaining why there is not contents to the lambda. |
Please comment indicating why you're dropping the unnamed bit fields.