[all-commits] [llvm/llvm-project] 8631c1: [SPIRV][NFC] Fix warnings for switch cases
Chris B via All-commits
all-commits at lists.llvm.org
Tue Apr 26 07:57:43 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8631c115905ea0662db3d69c16f1edaf9292437f
https://github.com/llvm/llvm-project/commit/8631c115905ea0662db3d69c16f1edaf9292437f
Author: Chris Bieneman <chris.bieneman at me.com>
Date: 2022-04-26 (Tue, 26 Apr 2022)
Changed paths:
M llvm/lib/Target/SPIRV/MCTargetDesc/SPIRVBaseInfo.cpp
M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
Log Message:
-----------
[SPIRV][NFC] Fix warnings for switch cases
Switch statements that cover all cases should not have a `default`
case. When a switch covers all cases and includes a `default` case,
clang emits a diagnostic. Omitting the `default` case allows the
compiler to instead emit a diagnostic on unhandled enum values.
This change removes default cases from all the places that they
shouldn't be, and adds a missing enum case for one switch statement
that wasn't covering all values.
More information about the All-commits
mailing list