]> granicus.if.org Git - clang/commitdiff
Changing a use of alignof() into llvm::alignOf() for MSVC compatibility. This require...
authorAaron Ballman <aaron@aaronballman.com>
Tue, 7 Jul 2015 12:50:30 +0000 (12:50 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Tue, 7 Jul 2015 12:50:30 +0000 (12:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241577 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclObjC.cpp

index ebe27a98c4ca18875016bb7ae36cf651220f23a7..d15cc88c39c3c7dd813df6cf4d77d498fd7c31b7 100644 (file)
@@ -1266,8 +1266,9 @@ ObjCTypeParamList *ObjCTypeParamList::create(
                      SourceLocation rAngleLoc) {
   unsigned size = sizeof(ObjCTypeParamList)
                 + sizeof(ObjCTypeParamDecl *) * typeParams.size();
-  static_assert(alignof(ObjCTypeParamList) >= alignof(ObjCTypeParamDecl*),
-                "type parameter list needs greater alignment");
+  assert(llvm::alignOf<ObjCTypeParamList>() >=
+             llvm::alignOf<ObjCTypeParamDecl *>() &&
+         "type parameter list needs greater alignment");
   unsigned align = llvm::alignOf<ObjCTypeParamList>();
   void *mem = ctx.Allocate(size, align);
   return new (mem) ObjCTypeParamList(lAngleLoc, typeParams, rAngleLoc);