aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-14 15:38:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-14 15:38:35 +0000
commitd2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch)
treee8a99a0386e8f6bece630700da5915c8a312c2d9 /lib/Parse/ParseDecl.cpp
parentfdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff)
downloadsrc-d2e0a8dd949ab874c6d66f97106bd5c270e2fa7d.tar.gz
src-d2e0a8dd949ab874c6d66f97106bd5c270e2fa7d.zip
Notes
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 833d93e4548a..2d320878014b 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -1591,7 +1591,7 @@ Parser::ParseSimpleDeclaration(unsigned Context,
DS.complete(TheDecl);
if (AnonRecord) {
Decl* decls[] = {AnonRecord, TheDecl};
- return Actions.BuildDeclaratorGroup(decls, /*TypeMayContainAuto=*/false);
+ return Actions.BuildDeclaratorGroup(decls);
}
return Actions.ConvertDeclToDeclGroup(TheDecl);
}
@@ -2045,8 +2045,6 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
}
}
- bool TypeContainsAuto = D.getDeclSpec().containsPlaceholderType();
-
// Parse declarator '=' initializer.
// If a '==' or '+=' is found, suggest a fixit to '='.
if (isTokenEqualOrEqualTypo()) {
@@ -2106,7 +2104,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
Actions.ActOnInitializerError(ThisDecl);
} else
Actions.AddInitializerToDecl(ThisDecl, Init.get(),
- /*DirectInit=*/false, TypeContainsAuto);
+ /*DirectInit=*/false);
}
} else if (Tok.is(tok::l_paren)) {
// Parse C++ direct initializer: '(' expression-list ')'
@@ -2149,7 +2147,7 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
T.getCloseLocation(),
Exprs);
Actions.AddInitializerToDecl(ThisDecl, Initializer.get(),
- /*DirectInit=*/true, TypeContainsAuto);
+ /*DirectInit=*/true);
}
} else if (getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace) &&
(!CurParsedObjCImpl || !D.isFunctionDeclarator())) {
@@ -2171,11 +2169,10 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
if (Init.isInvalid()) {
Actions.ActOnInitializerError(ThisDecl);
} else
- Actions.AddInitializerToDecl(ThisDecl, Init.get(),
- /*DirectInit=*/true, TypeContainsAuto);
+ Actions.AddInitializerToDecl(ThisDecl, Init.get(), /*DirectInit=*/true);
} else {
- Actions.ActOnUninitializedDecl(ThisDecl, TypeContainsAuto);
+ Actions.ActOnUninitializedDecl(ThisDecl);
}
Actions.FinalizeDeclaration(ThisDecl);