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

Bill Wendling via All-commits all-commits at lists.llvm.org
Fri Apr 15 12:29:51 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: aed923b1246ac38335b222b89594516fcf0d6385
      https://github.com/llvm/llvm-project/commit/aed923b1246ac38335b222b89594516fcf0d6385
  Author: Bill Wendling <isanbard at gmail.com>
  Date:   2022-04-15 (Fri, 15 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