[llvm] [Offload] Add default for HSA agent type to silence warning (PR #145943)
Ross Brunton via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 3 03:14:46 PDT 2025
RossBrunton wrote:
This has started throwing this warning for me:
```c++
llvm-project/offload/plugins-nextgen/amdgpu/src/rtl.cpp:2594:7: warning: default label in switch which covers all enumeration values [-Wcovered-switch-default]
2594 | default:
| ^
1 warning generated.
```
Given that the enum has no underlying type, is the compiler allowed to discard this "default" branch as part of optimisations since the enum isn't allowed to contain invalid values?
https://github.com/llvm/llvm-project/pull/145943
More information about the llvm-commits
mailing list