[llvm] b8ff08d - [Frontend][OpenMP] Add missing "return" statement after 40137ff0d81be
Krzysztof Parzyszek via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 22 13:35:49 PDT 2024
Author: Krzysztof Parzyszek
Date: 2024-04-22T15:35:42-05:00
New Revision: b8ff08d0e668e5397dd799b76ede0bd54fcba75c
URL: https://github.com/llvm/llvm-project/commit/b8ff08d0e668e5397dd799b76ede0bd54fcba75c
DIFF: https://github.com/llvm/llvm-project/commit/b8ff08d0e668e5397dd799b76ede0bd54fcba75c.diff
LOG: [Frontend][OpenMP] Add missing "return" statement after 40137ff0d81be
When responding to review comments, `return {}` was accidentally replaced
by `std::nullptr` instead of `return std::nullptr`.
Added:
Modified:
llvm/lib/Frontend/OpenMP/OMP.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Frontend/OpenMP/OMP.cpp b/llvm/lib/Frontend/OpenMP/OMP.cpp
index e958bced3a4224..e097510592c9ab 100644
--- a/llvm/lib/Frontend/OpenMP/OMP.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMP.cpp
@@ -29,7 +29,7 @@ namespace llvm::omp {
ArrayRef<Directive> getLeafConstructs(Directive D) {
auto Idx = static_cast<std::size_t>(D);
if (Idx >= Directive_enumSize)
- std::nullopt;
+ return std::nullopt;
const auto *Row = LeafConstructTable[LeafConstructTableOrdering[Idx]];
return ArrayRef(&Row[2], static_cast<int>(Row[1]));
}
More information about the llvm-commits
mailing list