[all-commits] [llvm/llvm-project] 33e212: [clang-tidy] Initialize boolean variables with `fa...

Danny Mösch via All-commits all-commits at lists.llvm.org
Sat Jul 9 05:49:58 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33e212954430d6116d7743541a7e9be8cdfac196
      https://github.com/llvm/llvm-project/commit/33e212954430d6116d7743541a7e9be8cdfac196
  Author: Danny Mösch <danny.moesch at icloud.com>
  Date:   2022-07-09 (Sat, 09 Jul 2022)

  Changed paths:
    M clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/init-variables.cpp

  Log Message:
  -----------
  [clang-tidy] Initialize boolean variables with `false` in cppcoreguidelines-init-variables' fix-it

In case of a variable with a built-in boolean type, `false` is a better fit to default-initialize it.

Reviewed By: njames93

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




More information about the All-commits mailing list