This change adds an option which, in addition to dumping the record
layout as is done by -fdump-record-layouts, causes us to compute the
layout for all complete record types (rather than the as-needed basis
which is usually done by clang), so that we will dump them as well.
This is useful if we are looking for layout differences across large
code bases without needing to instantiate every type we are interested in.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
52,570 ms | x64 debian > libFuzzer.libFuzzer::fork.test |
Event Timeline
clang/lib/AST/Decl.cpp | ||
---|---|---|
4585 | Nit: please add whitespace around =. (Have you run git-clang-format? That should fix this.) | |
4586 | Probably this deserves a comment, explaining that computing the record layout has a side effect of dumping it. Nit: I think we usually skip braces for one-line if statements. | |
4587 | Might be reasonable to cast to (void) rather than assigning to an ignored variable. |
This breaks check-clang: http://45.33.8.238/linux/49502/step_7.txt
Please take a look and revert for now if it takes a while to fix. It's been a pretty rough day for the tree.
Probably the "need to bump AST serialization Version after adding a langopt" thing again?
clang-format: please reformat the code