r270693 - Fix build problem in MSVC

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Wed May 25 05:51:25 PDT 2016


Author: abataev
Date: Wed May 25 07:51:24 2016
New Revision: 270693

URL: http://llvm.org/viewvc/llvm-project?rev=270693&view=rev
Log:
Fix build problem in MSVC

Modified:
    cfe/trunk/lib/AST/OpenMPClause.cpp

Modified: cfe/trunk/lib/AST/OpenMPClause.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/OpenMPClause.cpp?rev=270693&r1=270692&r2=270693&view=diff
==============================================================================
--- cfe/trunk/lib/AST/OpenMPClause.cpp (original)
+++ cfe/trunk/lib/AST/OpenMPClause.cpp Wed May 25 07:51:24 2016
@@ -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);
 }
 




More information about the cfe-commits mailing list