[PATCH] D143300: [randstruct] Don't allow implicit forward decl to stop struct randomization

Bill Wendling via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 6 09:53:59 PST 2023


void added a comment.

In D143300#4107132 <https://reviews.llvm.org/D143300#4107132>, @nickdesaulniers wrote:

> In D143300#4104469 <https://reviews.llvm.org/D143300#4104469>, @MaskRay wrote:
>
>> `clang/test/CodeGen/init-randomized-struct-fwd-decl.c` passes without this patch. Is it correct?
>
> Perhaps related to my comment about RecordDecl vs EnumDecl...
>
> or the tests might require a specific randomization seed?

It was a think-o on my part. The `__attribute__((randomize_layout))` forces randomization. And yes I need to add a check for EnumDecl. Patch incoming.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143300/new/

https://reviews.llvm.org/D143300



More information about the cfe-commits mailing list