[all-commits] [llvm/llvm-project] 7fed09: [randstruct] Don't allow implicit forward decl to ...
Bill Wendling via All-commits
all-commits at lists.llvm.org
Mon Feb 6 23:08:03 PST 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: 7fed09b3a6734d556b7a8c03bb05a9beb685aaab
https://github.com/llvm/llvm-project/commit/7fed09b3a6734d556b7a8c03bb05a9beb685aaab
Author: Bill Wendling <morbo at google.com>
Date: 2023-02-07 (Tue, 07 Feb 2023)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
A clang/test/CodeGen/init-randomized-struct-fwd-decl.c
Log Message:
-----------
[randstruct] Don't allow implicit forward decl to stop struct randomization
If a struct/enum type used in a record doesn't have a forward decl /
def, an implicit one is injected into the struct. This stops clang from
randomizing the structure in some situations---i.e. when the struct
contains only function pointers. So we accept forward decls so they
don't prevent randomization.
Fixes 60349
Reviewed By: MaskRay, nickdesaulniers
Differential Revision: https://reviews.llvm.org/D143300
(cherry picked from commit f85a9a6452e8f49f9768d66a86434a88a5891614)
More information about the All-commits
mailing list