HomePhabricator

Add { } to silence compiler warning [NFC]

Description

Add { } to silence compiler warning [NFC]

At least clang 3.6 warns on the original code:

../tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp:829:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]

return std::array<Address, 1>({Address(nullptr, CharUnits::Zero())});
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                               {                                  }

../tools/clang/lib/CodeGen/CGNonTrivialStruct.cpp:833:34: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]

return std::array<Address, 2>({Address(nullptr, CharUnits::Zero()),
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2 errors generated.

Details

Committed
uabelhoApr 10 2019, 11:57 PM
Parents
rL358151: [OpenCL] Re-fix invalid address space generation for clk_event_t arguments of…
Branches
Unknown
Tags
Unknown