On 6 Jul 2015 9:11 pm, "Douglas Gregor" <[email protected]> wrote:
>
> Author: dgregor
> Date: Mon Jul  6 23:06:31 2015
> New Revision: 241551
>
> URL: http://llvm.org/viewvc/llvm-project?rev=241551&view=rev
> Log:
> Use llvm::alignOf rather than alignof()
>
> Modified:
>     cfe/trunk/include/clang/AST/TypeLoc.h
>
> Modified: cfe/trunk/include/clang/AST/TypeLoc.h
> URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/TypeLoc.h?rev=241551&r1=241550&r2=241551&view=diff
>
==============================================================================
> --- cfe/trunk/include/clang/AST/TypeLoc.h (original)
> +++ cfe/trunk/include/clang/AST/TypeLoc.h Mon Jul  6 23:06:31 2015
> @@ -948,8 +948,8 @@ public:
>    }
>
>    unsigned getExtraLocalDataAlignment() const {
> -    static_assert(alignof(ObjCObjectTypeLoc) >= alignof(TypeSourceInfo
*),
> -                  "not enough alignment for tail-allocated data");
> +    assert(llvm::alignOf<ObjCObjectTypeLoc>() >
llvm::alignOf<TypeSourceInfo *>()
> +           && "not enough alignment for tail-allocated data");

You can turn this back into a static_assert by using llvm::AlignOf instead.

>      return llvm::alignOf<TypeSourceInfo *>();
>    }
>
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to