summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseCXXInlineMethods.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-10-17 17:09:53 +0000
committerDouglas Gregor <dgregor@apple.com>2011-10-17 17:09:53 +0000
commit50cefbf212be42a9cffecca03b1790f2393cbc85 (patch)
tree3e61476b07150a2defcf9ad4729688a5490a683e /clang/lib/Parse/ParseCXXInlineMethods.cpp
parent0ade47acd0f57ac294c5ebe7a184b09d55e90604 (diff)
downloadbcm5719-llvm-50cefbf212be42a9cffecca03b1790f2393cbc85.tar.gz
bcm5719-llvm-50cefbf212be42a9cffecca03b1790f2393cbc85.zip
When we end up having to parse the initializer of a C++ member early
in -fms-extensions mode, make sure we actually use that initializer after having handled the declaration. Fixes PR11150. llvm-svn: 142195
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r--clang/lib/Parse/ParseCXXInlineMethods.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp
index c9107b466d6..04c05d0cc38 100644
--- a/clang/lib/Parse/ParseCXXInlineMethods.cpp
+++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp
@@ -43,13 +43,13 @@ Decl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS,
else {
FnD = Actions.ActOnCXXMemberDeclarator(getCurScope(), AS, D,
move(TemplateParams), 0,
- VS, /*HasInit=*/false);
+ VS, /*HasDeferredInit=*/false);
if (FnD) {
Actions.ProcessDeclAttributeList(getCurScope(), FnD, AccessAttrs,
false, true);
bool TypeSpecContainsAuto
= D.getDeclSpec().getTypeSpecType() == DeclSpec::TST_auto;
- if (Init.get())
+ if (Init.isUsable())
Actions.AddInitializerToDecl(FnD, Init.get(), false,
TypeSpecContainsAuto);
else
OpenPOWER on IntegriCloud