]> granicus.if.org Git - clang/commitdiff
Fix build problem in MSVC
authorAlexey Bataev <a.bataev@hotmail.com>
Wed, 25 May 2016 12:51:24 +0000 (12:51 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Wed, 25 May 2016 12:51:24 +0000 (12:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270693 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/OpenMPClause.cpp

index 01a2d11c541619b75920f402eeda806bd6e45d54..23c05d5c28179d4521e0f20c60e6a16a97800b68 100644 (file)
@@ -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);
 }