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:
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
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
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/
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
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
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
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
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
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
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
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
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())) {
13 matches
Mail list logo