aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-09-07 20:36:12 +0000
committerDouglas Gregor <dgregor@apple.com>2011-09-07 20:36:12 +0000
commit2eef427c8666cbe9a3cad40d4947c67c3ba0c400 (patch)
tree4de5e54be650196fe3ead1b9a212125a9e96616e /lib/Parse/ParseStmt.cpp
parent82340e8cbd353ae4ddb545f61ba9816c8d69ba8e (diff)
When parsing a function-try-block that does not have a
ctor-initializer, remember to call the Sema action to generate default ctor-initializers. What a delightful little miscompile. Fixes PR10578 / <rdar://problem/9877267>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseStmt.cpp')
-rw-r--r--lib/Parse/ParseStmt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp
index e400ed1391..3abb0c5cbf 100644
--- a/lib/Parse/ParseStmt.cpp
+++ b/lib/Parse/ParseStmt.cpp
@@ -1856,7 +1856,9 @@ Decl *Parser::ParseFunctionTryBlock(Decl *Decl, ParseScope &BodyScope) {
// Constructor initializer list?
if (Tok.is(tok::colon))
ParseConstructorInitializer(Decl);
-
+ else
+ Actions.ActOnDefaultCtorInitializers(Decl);
+
if (PP.isCodeCompletionEnabled()) {
if (trySkippingFunctionBodyForCodeCompletion()) {
BodyScope.Exit();