specify custom brace style to fix unions

BreakBeforeBraces: Allman apparently includes all styles,
except for AfterUnion (which is false) when using clang-format -dump-config
This commit is contained in:
BhaaL
2017-01-04 12:45:40 +01:00
parent 41101be545
commit 23d99f2f2c
47 changed files with 375 additions and 182 deletions

View File

@ -2665,7 +2665,8 @@ void ARM64FloatEmitter::EncodeLoadStoreRegisterOffset(u32 size, bool load, ARM64
void ARM64FloatEmitter::EncodeModImm(bool Q, u8 op, u8 cmode, u8 o2, ARM64Reg Rd, u8 abcdefgh)
{
union {
union
{
u8 hex;
struct
{

View File

@ -104,7 +104,8 @@ const int frsqrte_expected_dec[] = {
double ApproximateReciprocalSquareRoot(double val)
{
union {
union
{
double valf;
s64 vali;
};
@ -178,7 +179,8 @@ double ApproximateReciprocal(double val)
// The workaround for this is to just use namespace std within this function's scope
// That way on real toolchains it will use the std:: variant like normal.
using namespace std;
union {
union
{
double valf;
s64 vali;
};

View File

@ -57,14 +57,16 @@ static const u64 DOUBLE_SIGN = 0x8000000000000000ULL, DOUBLE_EXP = 0x7FF00000000
static const u32 FLOAT_SIGN = 0x80000000, FLOAT_EXP = 0x7F800000, FLOAT_FRAC = 0x007FFFFF,
FLOAT_ZERO = 0x00000000;
union IntDouble {
union IntDouble
{
double d;
u64 i;
explicit IntDouble(u64 _i) : i(_i) {}
explicit IntDouble(double _d) : d(_d) {}
};
union IntFloat {
union IntFloat
{
float f;
u32 i;

View File

@ -52,7 +52,8 @@ struct TraversalPacket
{
u8 type;
TraversalRequestId requestId;
union {
union
{
struct
{
u8 ok;