[llvm] [NFC] Add SHF_NONE to fix Werror=extra warning (PR #112808)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 01:19:24 PDT 2024


https://github.com/jh7370 requested changes to this pull request.

This feels like an overzealous warning to me, and I think we should suppress it in LLVM/ignore it, based on our warning policy (I saw some discussion of this in Discourse recently, but can't remember the conclusion).

The use of an enum for the section flags isn't strictly necessary - it's just a way of defining named constants. Perhaps we could just replace the values with a series of `const Elf_Word` types, but I would prefer to just not have this warning. We should use strong enum types where we don't want to be able to mix enum values with non-enum values, and allow this mixture otherwise.

https://github.com/llvm/llvm-project/pull/112808


More information about the llvm-commits mailing list