[PATCH] D60646: [lld] Add double-braces for std::array to suppress warnings. NFC.

Xing via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 13 05:48:06 PDT 2019


Higuoxing added a comment.

In D60646#1465405 <https://reviews.llvm.org/D60646#1465405>, @MaskRay wrote:

> rC314838 <https://reviews.llvm.org/rC314838> (included in clang 6) suppressed -Wmissing-braces (enabled by -Wmost and -Wall) warning for the idiomatic brace elision.
>
> http://lists.llvm.org/pipermail/llvm-dev/2019-April/131486.html llvm will migrate to C++14 soon... (though clang < 6 will continue warning the case; I'm not sure if we want to make code less idiomatic just to suppress warnings for old clang; gcc `-Wall` doesn't enable `-Wmissing-braces`)


Thanks a lot for pointing this out. Actually, I'd prefer not using double-braces. Just a few days ago, I saw a commit that added double-braces to suppress this warning in another project, so I put it here for discussion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60646/new/

https://reviews.llvm.org/D60646





More information about the llvm-commits mailing list