[clang] [clang][amdgpu] mapCABIAtomicOrdering - fix MSVC not all control paths return a value warning. NFC. (PR #180500)
Simon Pilgrim via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 9 03:00:52 PST 2026
================
@@ -290,6 +290,7 @@ static llvm::AtomicOrdering mapCABIAtomicOrdering(unsigned AO) {
case llvm::AtomicOrderingCABI::relaxed:
return llvm::AtomicOrdering::Monotonic;
}
+ llvm_unreachable("Unknown AtomicOrderingCABI enum");
----------------
RKSimon wrote:
A default case would fix the MSVC warning, but IIRC gcc doesn't like switch(enum class) with an unnecessary default :/
https://github.com/llvm/llvm-project/pull/180500
More information about the cfe-commits
mailing list