lichray updated this revision to Diff 120913.
lichray added a comment.
Make the feature unconditional with an `ExtWarn`
https://reviews.llvm.org/D39284
Files:
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/DeclSpec.h
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaDeclCXX.cpp
t
rsmith added inline comments.
Comment at: include/clang/Sema/DeclSpec.h:2015
case ConditionContext:
+ return Lang.CPlusPlus2a;
case MemberContext:
If there's no grammar ambiguities here (and I don't think there are), please
accept this uncondition
lichray added a comment.
In https://reviews.llvm.org/D39284#906899, @aaron.ballman wrote:
> We typically diagnose vendor extensions to the language, and I think we
> should apply that consistently. Otherwise, your code will compile fine in
> Clang with warning levels cranked all the way up and
lichray updated this revision to Diff 120295.
lichray added a comment.
One more test case
https://reviews.llvm.org/D39284
Files:
include/clang/Sema/DeclSpec.h
lib/Parse/ParseExprCXX.cpp
lib/Sema/SemaDeclCXX.cpp
test/Parser/cxx2a-decomposition.cpp
test/SemaCXX/cxx2a-decomposition.cpp
aaron.ballman added a comment.
In https://reviews.llvm.org/D39284#906889, @lichray wrote:
> In https://reviews.llvm.org/D39284#906860, @aaron.ballman wrote:
>
> > I'm aware, but I was unaware that we've accepted this functionality in
> > C++2a yet within WG21. Did we vote this in and I simply di
lichray added a comment.
In https://reviews.llvm.org/D39284#906860, @aaron.ballman wrote:
> I'm aware, but I was unaware that we've accepted this functionality in C++2a
> yet within WG21. Did we vote this in and I simply didn't remember it?
No. In the first line of the Summary I said this has
aaron.ballman added a comment.
In https://reviews.llvm.org/D39284#906800, @lichray wrote:
> In https://reviews.llvm.org/D39284#906450, @aaron.ballman wrote:
>
> > I'm not opposed to the functionality, but this isn't a part of C++2a
> > either; I think we should be diagnosing this code with a war
lichray added a comment.
In https://reviews.llvm.org/D39284#906450, @aaron.ballman wrote:
> I'm not opposed to the functionality, but this isn't a part of C++2a either;
> I think we should be diagnosing this code with a warning so users don't
> expect it to work on every compiler.
C++2a the s
aaron.ballman added a comment.
I'm not opposed to the functionality, but this isn't a part of C++2a either; I
think we should be diagnosing this code with a warning so users don't expect it
to work on every compiler.
https://reviews.llvm.org/D39284
__
lichray created this revision.
This feature was discussed but not yet proposed. It allows a structured
binding to appear as a //condition//
if (auto [ok, val] = f(...))
So the user can save an extra //condition// if the statement can query the
value to-be-decomposed instead. Formally, it m
10 matches
Mail list logo