]> granicus.if.org Git - clang/commit
Add { } to silence compiler warning [NFC]
authorMikael Holmen <mikael.holmen@ericsson.com>
Thu, 11 Apr 2019 06:57:12 +0000 (06:57 +0000)
committerMikael Holmen <mikael.holmen@ericsson.com>
Thu, 11 Apr 2019 06:57:12 +0000 (06:57 +0000)
commit0bbdb288ca016f409061cb4d453cb8af90e28e07
tree1d0ae484b47a0b4ee274f014a7e2d9acffc6d062
parent735ec25f02d064f5b30c94277349b698d41f0568
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@358152 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGNonTrivialStruct.cpp