[PATCH] D88288: [Archive] Don't throw away errors for malformed archive members
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 11:17:35 PDT 2020
rupprecht added inline comments.
================
Comment at: llvm/lib/Object/SymbolicFile.cpp:106
+ case file_magic::tapi_file:
+ return false;
+ }
----------------
MaskRay wrote:
> ```
> default:
> return true;
> ```
>
> resolves a clang warning: `Object/SymbolicFile.cpp:97:11: warning: 23 enumeration values not handled in switch: 'bitcode', 'elf', 'elf_relocatable'... [-Wswitch]`
>
Yes, but see my other comment, because that is addressing a symptom instead of fixing the cause. Having an explicit switch in the previous switch ensures that a new file type added doesn't accidentally get included in the default switch branch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88288/new/
https://reviews.llvm.org/D88288
More information about the llvm-commits
mailing list