diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-29 20:58:47 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-29 20:58:47 +0000 |
| commit | d1b6c770bea9b3da66c6c1eb9a7c483ed7e55c1e (patch) | |
| tree | fe0f8eccf127c346ac2e08e36ec2af95072f4458 /lib/AST/ASTContext.cpp | |
| parent | 865493b10990f9932c79d135eef448ff418792ab (diff) | |
Notes
Diffstat (limited to 'lib/AST/ASTContext.cpp')
| -rw-r--r-- | lib/AST/ASTContext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp index d03c22af5b29..b531a66dbab3 100644 --- a/lib/AST/ASTContext.cpp +++ b/lib/AST/ASTContext.cpp @@ -9025,7 +9025,8 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) { // Variables that have initialization with side-effects are required. if (VD->getInit() && VD->getInit()->HasSideEffects(*this) && - !VD->evaluateValue()) + // We can get a value-dependent initializer during error recovery. + (VD->getInit()->isValueDependent() || !VD->evaluateValue())) return true; // Likewise, variables with tuple-like bindings are required if their |
