summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx1z-decomposition.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Allow conditions to be decomposed with structured bindingsZhihao Yuan2017-12-071-7/+8
| | | | | | | | | | | | | | | | | | | | | Summary: 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 test the value to-be-decomposed instead. Formally, it makes the value of the underlying object of the structured binding declaration also the value of a //condition// that is an initialized declaration. Considering its logicality which is entirely evident from its trivial implementation, I think it might be acceptable to land it as an extension for now before I write the paper. Reviewers: rsmith, faisalv, aaron.ballman Reviewed By: rsmith Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D39284 llvm-svn: 320011
* [c++17] P0490R0, NB comment FI 20: allow direct-initialization of ↵Richard Smith2016-12-091-1/+3
| | | | | | decomposition declarations. llvm-svn: 289286
* P0217R3: Perform semantic checks and initialization for the bindings in aRichard Smith2016-08-111-2/+15
| | | | | | | decomposition declaration for arrays, aggregate-like structs, tuple-like types, and (as an extension) for complex and vector types. llvm-svn: 278435
* P0217R3: Parsing support and framework for AST representation of C++1zRichard Smith2016-07-221-0/+135
decomposition declarations. There are a couple of things in the wording that seem strange here: decomposition declarations are permitted at namespace scope (which we partially support here) and they are permitted as the declaration in a template (which we reject). llvm-svn: 276492
OpenPOWER on IntegriCloud