[all-commits] [llvm/llvm-project] 7f31b4: [randstruct] Enforce using a designated init for a...

Bill Wendling via All-commits all-commits at lists.llvm.org
Sat Apr 16 23:25:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7f31b4a917d8cc13df5eac4b7f0520639c3a8fff
      https://github.com/llvm/llvm-project/commit/7f31b4a917d8cc13df5eac4b7f0520639c3a8fff
  Author: Bill Wendling <isanbard at gmail.com>
  Date:   2022-04-16 (Sat, 16 Apr 2022)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaInit.cpp
    A clang/test/Sema/init-randomized-struct.c

  Log Message:
  -----------
  [randstruct] Enforce using a designated init for a randomized struct

A randomized structure needs to use a designated or default initializer.
Using a non-designated initializer will result in values being assigned
to the wrong fields.

Differential Revision: https://reviews.llvm.org/D123763




More information about the All-commits mailing list