aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2012-01-27 01:29:43 +0000
committerJohn McCall <rjmccall@apple.com>2012-01-27 01:29:43 +0000
commit6895a644ca9df03af14ad06deaa950a09dd352d2 (patch)
tree851a522581f5b31167ca4188ce0fb829ecabe922 /lib/Parse/ParseDecl.cpp
parent745f5147e065900267c85a5568785a1991d4838f (diff)
Be sure to emit delayed diagnostics after parsing the declaration
of a for-range variable. Fixes PR11793. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index ac9b11289d..b04baa7db8 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1110,6 +1110,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS,
Decl *ThisDecl = Actions.ActOnDeclarator(getCurScope(), D);
Actions.ActOnCXXForRangeDecl(ThisDecl);
Actions.FinalizeDeclaration(ThisDecl);
+ D.complete(ThisDecl);
return Actions.FinalizeDeclaratorGroup(getCurScope(), DS, &ThisDecl, 1);
}