]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Apply a workaround to be able to build clang 8.0.0 headers with clang
authordim <dim@FreeBSD.org>
Wed, 10 Jul 2019 05:57:37 +0000 (05:57 +0000)
committerdim <dim@FreeBSD.org>
Wed, 10 Jul 2019 05:57:37 +0000 (05:57 +0000)
commitb9b2180ceb5f882e9c037c87356e174e6026264c
tree0545fc0fbbd0f01d0581ee521f45c60a508c59c2
parent9382dc3112adbf55a870d1c2c136e37185bb6ef0
Apply a workaround to be able to build clang 8.0.0 headers with clang
3.4.1, which is still in the stable/10 branch.

It looks like clang 3.4.1 implements static_asserts by instantiating a
temporary static object, and if those are in an anonymous union, it
results in "error: anonymous union can only contain non-static data
members".

To work around this implementation limitation, move the static_asserts
in question out of the anonymous unions.

This should make building the latest stable/11 from stable/10 possible
again.

Reported by: Mike Tancsa <mike@sentex.net>
MFC after: 3 days
contrib/llvm/tools/clang/include/clang/AST/DeclBase.h
contrib/llvm/tools/clang/include/clang/AST/Type.h