diff options
| author | Malcolm Parsons <malcolm.parsons@gmail.com> | 2019-02-08 19:44:42 +0000 |
|---|---|---|
| committer | Malcolm Parsons <malcolm.parsons@gmail.com> | 2019-02-08 19:44:42 +0000 |
| commit | 297b6a2b6ea68a0a5cda92c785abf292ac571683 (patch) | |
| tree | bb6be8a9fc3c55b5bd2be895482e9241e9d10507 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 01e818a97d6afb1983983021c2029aafc4124170 (diff) | |
| download | bcm5719-llvm-297b6a2b6ea68a0a5cda92c785abf292ac571683.tar.gz bcm5719-llvm-297b6a2b6ea68a0a5cda92c785abf292ac571683.zip | |
[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
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
0 files changed, 0 insertions, 0 deletions

