[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-06 Thread Zhihao Yuan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC320011: Allow conditions to be decomposed with structured bindings (authored by lichray). Changed prior to commit: https://reviews.llvm.org/D39284?vs=125665&id=125892#toc Repository: rC Clang https:

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-06 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. Can someone commit this please? One more patch then I'll go get a commit bit. Repository: rC Clang https://reviews.llvm.org/D39284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mai

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith accepted this revision. rsmith added a comment. This revision is now accepted and ready to land. Thanks, LGTM! Repository: rC Clang https://reviews.llvm.org/D39284 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.o

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-05 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 125665. lichray marked an inline comment as done. lichray added a comment. Added -Wbinding-in-condition. Repository: rC Clang https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-05 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked an inline comment as done. lichray added inline comments. Comment at: test/Misc/warning-flags.c:19 The list of warnings below should NEVER grow. It should gradually shrink to 0. rsmith wrote: > lichray wrote: > > rsmith wrote: > > > Please re

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-05 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: test/Misc/warning-flags.c:19 The list of warnings below should NEVER grow. It should gradually shrink to 0. lichray wrote: > rsmith wrote: > > Please read and respect this rule :) > Do you know of some categories wh

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-05 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 125581. lichray added a comment. Rebased. Repository: rC Clang https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDeclCXX.cpp test/Misc/warning

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:712-720 + Diag(Decomp.getLSquareLoc(), [&] { +if (getLangOpts().CPlusPlus1z) { + if (D.getContext() == Declarator::ConditionContext) +return diag::ext_decomp_decl_cond; + else +retu

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-12-03 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 125288. lichray marked 3 inline comments as done. lichray added a comment. Rephrase warning message. Repository: rC Clang https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/Pars

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-11-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:414 +def ext_decomp_decl_cond : ExtWarn< + "decomposed condition is a Clang extension">; def err_decomp_decl_spec : Error< Phrase this as "ISO C++17 does not permit structured

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 120922. lichray marked an inline comment as done. lichray added a comment. Tweak coding style https://reviews.llvm.org/D39284 Files: include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDec

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:696-698 + // a for-range-declaration, or a condition in C++2a, but we parse it in more + // cases than that. + if (!D.mayHaveDecompositionDeclarator(getLangOpts())) { lichray wrote: > rsmith wr

[PATCH] D39284: Allow conditions to be decomposed with structured bindings

2017-10-30 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray marked 3 inline comments as done. lichray added inline comments. Comment at: lib/Sema/SemaDeclCXX.cpp:696-698 + // a for-range-declaration, or a condition in C++2a, but we parse it in more + // cases than that. + if (!D.mayHaveDecompositionDeclarator(getLangOpts())) {