Reapply r349876:
authorDimitry Andric <dim@FreeBSD.org>
Thu, 6 Aug 2020 16:42:48 +0000 (16:42 +0000)
committerDimitry Andric <dim@FreeBSD.org>
Thu, 6 Aug 2020 16:42:48 +0000 (16:42 +0000)
commitebc1d79affdadba662786fd002e4f6663fd95ccc
tree2abe9b206a3fa95de35e79aaeb188a6af5acb7ce
parent4beee107921198ecca69a26d70533b36e96bb21c
Reapply r349876:

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>
contrib/llvm-project/clang/include/clang/AST/DeclBase.h
contrib/llvm-project/clang/include/clang/AST/Type.h