[all-commits] [llvm/llvm-project] 2d8e91: [clang-tidy] Ignore other members in a union if an...

Liu Ke via All-commits all-commits at lists.llvm.org
Thu Aug 25 03:49:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d8e91a5d3597461b5ae2a40d9362abde67b5e1f
      https://github.com/llvm/llvm-project/commit/2d8e91a5d3597461b5ae2a40d9362abde67b5e1f
  Author: Sockke <liuke.gehry at bytedance.com>
  Date:   2022-08-25 (Thu, 25 Aug 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp

  Log Message:
  -----------
  [clang-tidy] Ignore other members in a union if any member of it is initialized in cppcoreguidelines-pro-type-member-init

If a union member is initialized, the other members of the union are still suggested to be initialized in this check.  This patch fixes this behavior.
Reference issue: https://github.com/llvm/llvm-project/issues/54748

Reviewed By: njames93

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




More information about the All-commits mailing list