diff options
author | Faisal Vali <faisalv@yahoo.com> | 2013-11-01 02:01:01 +0000 |
---|---|---|
committer | Faisal Vali <faisalv@yahoo.com> | 2013-11-01 02:01:01 +0000 |
commit | 32b5ca012c42d418c9ff0d4175b17f174459e187 (patch) | |
tree | 011cbd59799d5610ca74a3e9f9d097be2eef1312 /lib/Parse/ParseCXXInlineMethods.cpp | |
parent | 257ddb2b4721e71749174ddaf03c6692df9dd346 (diff) |
Support return type deduction for templates in -fdelayed-template-parsing (microsoft) mode
Please see http://llvm-reviews.chandlerc.com/D2053 for discussion and Richard's stamp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | lib/Parse/ParseCXXInlineMethods.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp index 863a09e89d..0c8ace59e3 100644 --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -109,13 +109,15 @@ NamedDecl *Parser::ParseCXXInlineMethodDef(AccessSpecifier AS, return FnD; } - + // In delayed template parsing mode, if we are within a class template // or if we are about to parse function member template then consume // the tokens and store them for parsing at the end of the translation unit. if (getLangOpts().DelayedTemplateParsing && DefinitionKind == FDK_Definition && - !D.getDeclSpec().isConstexprSpecified() && + !D.getDeclSpec().isConstexprSpecified() && + !(FnD && getFunctionDecl(FnD) && + getFunctionDecl(FnD)->getResultType()->getContainedAutoType()) && ((Actions.CurContext->isDependentContext() || (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate && TemplateInfo.Kind != ParsedTemplateInfo::ExplicitSpecialization)) && |