[PATCH] D59754: [Sema] Add c++2a designated initializer warnings
Nicolas Lesser via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 02:36:16 PDT 2019
Rakete1111 added inline comments.
================
Comment at: clang/lib/Sema/SemaInit.cpp:2044
+ : std::distance(RD->field_begin(), RD->field_end());
+ if (VerifyOnly && (LastIdx >= NextIdx || HasNonDesignatedInit) &&
+ SemaRef.getLangOpts().CPlusPlus2a)
----------------
hintonda wrote:
> Rakete1111 wrote:
> > `!VerifyOnly` and braces please.
> Will commit this change as soon as check-clang finishes, but not sure I grok the VerityOnly/!VerifyOnly criteria. Could you help me out?
`VerifyOnly` is used if you only want to verify and not actually generate any diagnostics or actually do anything that would commit to that change. So only generate the warning if `!VerifyOnly`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59754/new/
https://reviews.llvm.org/D59754
More information about the cfe-commits
mailing list