summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/lib/AST/OpenMPClause.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/AST/OpenMPClause.cpp b/clang/lib/AST/OpenMPClause.cpp
index 01a2d11c541..23c05d5c281 100644
--- a/clang/lib/AST/OpenMPClause.cpp
+++ b/clang/lib/AST/OpenMPClause.cpp
@@ -526,10 +526,7 @@ OMPDependClause *OMPDependClause::Create(
}
OMPDependClause *OMPDependClause::CreateEmpty(const ASTContext &C, unsigned N) {
- void *Mem = C.Allocate(totalSizeToAlloc<Expr *>(
- static_cast<typename llvm::trailing_objects_internal::ExtractSecondType<
- Expr *, size_t>::type>(N) +
- 1));
+ void *Mem = C.Allocate(totalSizeToAlloc<Expr *>(N + 1));
return new (Mem) OMPDependClause(N);
}
OpenPOWER on IntegriCloud