Commit Graph

11 Commits

Author SHA1 Message Date
Erik Pilkington 21ff345d64 [Sema][C++1z] Ensure binding in dependent range for have non-null type
Fixes PR32172

Differential revision: https://reviews.llvm.org/D34096

llvm-svn: 305195
2017-06-12 16:11:06 +00:00
Richard Smith 1cf4541c4f Bail out if we try to build a DeclRefExpr naming an invalid declaration.
Most code paths would already bail out in this case, but certain paths,
particularly overload resolution and typo correction, would not. Carrying on
with an invalid declaration could in some cases result in crashes due to
downstream code relying on declaration invariants that are not necessarily
met for invalid declarations, and in other cases just resulted in undesirable
follow-on diagnostics.

llvm-svn: 291030
2017-01-04 23:14:16 +00:00
Richard Trieu cbd54304a3 When a DecompositionDecl is marked invalid, also set the child BindingDecl's to
invalid.

llvm-svn: 286630
2016-11-11 20:51:04 +00:00
Richard Smith f70a906a11 [c++1z] Fix assertion failure when using the wrong number of bindings for a
struct with unnamed bitfields.

llvm-svn: 284761
2016-10-20 18:29:25 +00:00
Richard Smith 1879f1069b Disable lambda-capture of decomposition declaration bindings for now, until CWG
agrees on how they're supposed to work.

llvm-svn: 278648
2016-08-15 02:34:23 +00:00
Richard Smith da38363784 P0217R3: code generation support for decomposition declarations.
llvm-svn: 278642
2016-08-15 01:33:41 +00:00
Richard Smith 7b76d81bdf P0217R3: serialization/deserialization support for c++17 decomposition declarations.
llvm-svn: 278460
2016-08-12 02:21:25 +00:00
Richard Smith 3997b1b427 P0217R3: template instantiation support for decomposition declarations.
llvm-svn: 278458
2016-08-12 01:55:21 +00:00
Richard Smith dca60b4958 P0217R3: Constant expression evaluation for decomposition declarations.
llvm-svn: 278447
2016-08-12 00:39:32 +00:00
Richard Smith 7873de0cf6 P0217R3: Perform semantic checks and initialization for the bindings in a
decomposition declaration for arrays, aggregate-like structs, tuple-like
types, and (as an extension) for complex and vector types.

llvm-svn: 278435
2016-08-11 22:25:46 +00:00
Richard Smith bdb84f374c P0217R3: Parsing support and framework for AST representation of C++1z
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
2016-07-22 23:36:59 +00:00