[PATCH] D39284: [c++2a] Decomposed _condition_
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 30 11:24:32 PDT 2017
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 unconditionally, with an `ExtWarn`.
================
Comment at: lib/Parse/ParseExprCXX.cpp:1711
/// [C++11] type-specifier-seq declarator braced-init-list
+/// [C++2a] type-specifier-seq ref-qualifier[opt] '[' identifier-list ']'
+/// brace-or-equal-initializer
----------------
This shouldn't be listed as `C++2a` until it's actually voted into the working draft. Listing it as `[Clang]` for a clang extension is fine.
================
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())) {
----------------
Again, please don't guess what's going to be in C++2a. I would actually expect that we'll vote this in as a DR against C++17. It seems like a wording oversight to me.
https://reviews.llvm.org/D39284
More information about the cfe-commits
mailing list