[clang-tidy] Don't use assignment for value-initialized enums

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
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

Fixes PR35050.

Reviewers: aaron.ballman, alexfh, JonasToth

Reviewed By: JonasToth

Subscribers: xazax.hun, cfe-commits

Tags: #clang

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

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@353554 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed