From 8048716efba45f745b6cf1da8ae08bba506283a4 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Tue, 7 Feb 2017 01:09:46 -0800 Subject: [PATCH 1/2] JitIL/IR.cpp: add braces around std::array initalizers Fixes the following warnings on macOS Clang: ``` Building CXX object Source/Core/Core/CMakeFiles/core.dir/PowerPC/JitILCommon/IR.cpp.o Source/Core/Core/PowerPC/JitILCommon/IR.cpp:1374:9: warning: suggest braces around initialization of subobject [-Wmissing-braces] LoadCR, LoadLink, LoadMSR, LoadGReg, LoadCTR, InterpreterBranch, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Source/Core/Core/PowerPC/JitILCommon/IR.cpp:1378:9: warning: suggest braces around initialization of subobject [-Wmissing-braces] StoreLink, ^~~~~~~~~~ Source/Core/Core/PowerPC/JitILCommon/IR.cpp:1419:9: warning: suggest braces around initialization of subobject [-Wmissing-braces] BranchCond, ^~~~~~~~~~~ 3 warnings generated. ``` --- Source/Core/Core/PowerPC/JitILCommon/IR.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 5c78ea883b..75e1f842df 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -1370,11 +1370,11 @@ unsigned IRBuilder::getNumberOfOperands(InstLoc I) const number_of_operands[CInt16] = 0; number_of_operands[CInt32] = 0; - static constexpr std::array zero_op = { + static constexpr std::array zero_op = {{ LoadCR, LoadLink, LoadMSR, LoadGReg, LoadCTR, InterpreterBranch, LoadCarry, RFIExit, LoadFReg, LoadFRegDENToZero, LoadGQR, Int3, - }; - static constexpr std::array unary_op = { + }}; + static constexpr std::array unary_op = {{ StoreLink, BranchUncond, StoreCR, @@ -1414,8 +1414,8 @@ unsigned IRBuilder::getNumberOfOperands(InstLoc I) const FastCREQSet, FastCRGTSet, FastCRLTSet, - }; - static constexpr std::array binary_op = { + }}; + static constexpr std::array binary_op = {{ BranchCond, IdleBranch, And, @@ -1460,7 +1460,7 @@ unsigned IRBuilder::getNumberOfOperands(InstLoc I) const FPMerge10, FPMerge11, FDCmpCR, - }; + }}; for (auto op : zero_op) number_of_operands[op] = 0; From 64405f26a8c888a8da0e1c89d70a6a92fd506206 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Tue, 7 Feb 2017 12:08:25 -0800 Subject: [PATCH 2/2] lint JitILCommon/IR.cpp --- Source/Core/Core/PowerPC/JitILCommon/IR.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 75e1f842df..62327b18e8 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -1371,8 +1371,8 @@ unsigned IRBuilder::getNumberOfOperands(InstLoc I) const number_of_operands[CInt32] = 0; static constexpr std::array zero_op = {{ - LoadCR, LoadLink, LoadMSR, LoadGReg, LoadCTR, InterpreterBranch, - LoadCarry, RFIExit, LoadFReg, LoadFRegDENToZero, LoadGQR, Int3, + LoadCR, LoadLink, LoadMSR, LoadGReg, LoadCTR, InterpreterBranch, LoadCarry, RFIExit, + LoadFReg, LoadFRegDENToZero, LoadGQR, Int3, }}; static constexpr std::array unary_op = {{ StoreLink,