HomePhabricator

Add { } to silence compiler warning [NFC]

Authored by uabelho on Apr 10 2019, 11:57 PM.

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.

llvm-svn: 358152

Details