llvm-project/clang-tools-extra/clang-tidy
Malcolm Parsons 297b6a2b6e [clang-tidy] Don't use assignment for value-initialized enums
Summary:
The modernize-use-default-member-init check crashes when trying to
create an assignment value for a value-initialized enum because it isn't a
BuiltinType.
An enum cannot be initialized by assigning 0 to it unless a cast is added.
It could be initialized with an enumerator with the value 0, but there might not
be one.
Avoid these issues by ignoring the UseAssignment setting for value-initialized
enums.

Fixes PR35050.

Reviewers: aaron.ballman, alexfh, JonasToth

Reviewed By: JonasToth

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

llvm-svn: 353554
2019-02-08 19:44:42 +00:00
..
abseil [clang-tidy] Add the abseil-duration-unnecessary-conversion check 2019-02-04 19:28:20 +00:00
android Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
boost Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
bugprone [clang-tidy] Add options to bugprone-argument-comment to add missing argument comments to literals 2019-02-08 17:00:01 +00:00
cert Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
cppcoreguidelines Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
fuchsia Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
google Revert rCTE352968 due to compilation failures 💥 2019-02-02 23:01:20 +00:00
hicpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
misc [clang-tidy] misc-non-private-member-variables-in-classes: ignore implicit methods 2019-01-20 14:28:27 +00:00
modernize [clang-tidy] Don't use assignment for value-initialized enums 2019-02-08 19:44:42 +00:00
mpi Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
objc Revert rCTE351921 to fix documentation geneeration. 2019-01-23 02:58:59 +00:00
performance Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
plugin Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
portability Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
readability [clang-tidy][NFC] Fix typo. 2019-02-08 15:05:57 +00:00
tool Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
utils [clang-tidy] refactor bugprone-exception-escape analysis into class 2019-01-31 10:46:37 +00:00
zircon Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Add explicit dependency on clangSerialization after rC348911 2018-12-12 08:25:16 +00:00
ClangTidy.cpp [clang-tidy] Use getStripPluginsAdjuster 2019-01-21 10:10:18 +00:00
ClangTidy.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyDiagnosticConsumer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyDiagnosticConsumer.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyForceLinker.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModule.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModule.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyModuleRegistry.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyOptions.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyProfiling.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ClangTidyProfiling.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
add_new_check.py Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
rename_check.py Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00