[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables with enum judgement
liushuai wang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 21 05:02:02 PDT 2021
MTC added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-init-variables.cpp:103
+ // Expect no warning given here.
+ Color color;
+ // Expect no warning given here.
----------------
steven.zhang wrote:
> Technical speaking, we should warn about such case, ad the color is undefined now. Can we initialize it to the lowerest value of the enum type ?
Good point! However, which value should be chosen as automatic fix is a problem worth discussing.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106431/new/
https://reviews.llvm.org/D106431
More information about the cfe-commits
mailing list