llvm-project
04364fb8 - [randstruct] Also randomize composite function pointer structs (#138385)

Commit
149 days ago
[randstruct] Also randomize composite function pointer structs (#138385) Check for struct members that are structs filled only with function pointers by recursively examining it. Since the lamba IsFunctionPointerOrForwardDecl cannot call itself directly, move it into a helper function, EntirelyFunctionPointers, so it can be called from the lambda. Add test for composite function pointer structs getting automatically randomized. Add more tests for validating automatic randomization vs explicitly annotated with "randomize_layout", and excluded with "no_randomize_layout". Reorder the "should we randomize?" "if" statement to check for enablement before checking for Record details. Fixes #138355
Author
Parents
Loading