[clang] 90a9f97 - [openmp] Use front() instead of *begin() to not hide bugs when CurTypes is empty.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 28 05:59:38 PDT 2020
Author: Benjamin Kramer
Date: 2020-10-28T13:58:23+01:00
New Revision: 90a9f97cbda3bef63d9866d300b73b8ccf65c7f5
URL: https://github.com/llvm/llvm-project/commit/90a9f97cbda3bef63d9866d300b73b8ccf65c7f5
DIFF: https://github.com/llvm/llvm-project/commit/90a9f97cbda3bef63d9866d300b73b8ccf65c7f5.diff
LOG: [openmp] Use front() instead of *begin() to not hide bugs when CurTypes is empty.
Added:
Modified:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
index 3cc4a6b6c9e4..d59dd6a2e7f7 100644
--- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -7989,7 +7989,7 @@ class MappableExprsHandler {
}))
CombinedInfo.Types.back() |= OMP_MAP_PRESENT;
// Remove TARGET_PARAM flag from the first element
- (*CurTypes.begin()) &= ~OMP_MAP_TARGET_PARAM;
+ CurTypes.front() &= ~OMP_MAP_TARGET_PARAM;
// All other current entries will be MEMBER_OF the combined entry
// (except for PTR_AND_OBJ entries which do not have a placeholder value
More information about the cfe-commits
mailing list