Skip to content

Conversation

@tblah
Copy link
Contributor

@tblah tblah commented Aug 4, 2025

GCC couldn't tell that the enum is checked exhaustively and so was warning about there being no return on this path from the function.

GCC couldn't tell that the enum is checked exhaustively and so was
warning about there being no return on this path from the function.
@llvmbot
Copy link
Member

llvmbot commented Aug 4, 2025

@llvm/pr-subscribers-mlir-openmp
@llvm/pr-subscribers-mlir-llvm
@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-flang-openmp

Author: Tom Eccles (tblah)

Changes

GCC couldn't tell that the enum is checked exhaustively and so was warning about there being no return on this path from the function.


Full diff: https://github.com/llvm/llvm-project/pull/151941.diff

1 Files Affected:

  • (modified) mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp (+1)
diff --git a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
index 49e1e55c686a6..762cc88d9fc3d 100644
--- a/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp
@@ -3391,6 +3391,7 @@ static llvm::omp::Directive convertCancellationConstructType(
   case omp::ClauseCancellationConstructType::Taskgroup:
     return llvm::omp::Directive::OMPD_taskgroup;
   }
+  llvm_unreachable("Unhandled cancellation construct type");
 }
 
 static LogicalResult

@tblah tblah merged commit edae78d into llvm:main Aug 4, 2025
14 checks passed
joker-eph pushed a commit to joker-eph/llvm-project that referenced this pull request Aug 20, 2025
GCC couldn't tell that the enum is checked exhaustively and so was
warning about there being no return on this path from the function.
tru pushed a commit that referenced this pull request Aug 26, 2025
GCC couldn't tell that the enum is checked exhaustively and so was
warning about there being no return on this path from the function.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants