diff options
author | Reid Kleckner <rnk@google.com> | 2016-03-17 19:52:20 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-03-17 19:52:20 +0000 |
commit | 0f6caf66e9975b7332bc6ce5ab29a8dfa12dfa58 (patch) | |
tree | ada1c36404a3a67ef14d8a5726c96fd4dcb65390 /clang/lib/Parse/ParseCXXInlineMethods.cpp | |
parent | 23dbc390af8218f0a3b3035d5380cd7087aefecc (diff) | |
download | llvm-0f6caf66e9975b7332bc6ce5ab29a8dfa12dfa58.zip llvm-0f6caf66e9975b7332bc6ce5ab29a8dfa12dfa58.tar.gz llvm-0f6caf66e9975b7332bc6ce5ab29a8dfa12dfa58.tar.bz2 |
For MS ABI, emit dllexport friend functions defined inline in class
Summary: ...as that is apparently what MSVC does
Reviewers: rnk
Patch by Stephan Bergmann
Differential Revision: http://reviews.llvm.org/D15267
llvm-svn: 263738
Diffstat (limited to 'clang/lib/Parse/ParseCXXInlineMethods.cpp')
-rw-r--r-- | clang/lib/Parse/ParseCXXInlineMethods.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index 07e32b7..3db75c7 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp @@ -564,8 +564,10 @@ void Parser::ParseLexedMethodDef(LexedMethod &LM) { if (Tok.is(tok::eof) && Tok.getEofData() == LM.D) ConsumeAnyToken(); - if (CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(LM.D)) - Actions.ActOnFinishInlineMethodDef(MD); + if (auto *FD = dyn_cast_or_null<FunctionDecl>(LM.D)) + if (isa<CXXMethodDecl>(FD) || + FD->isInIdentifierNamespace(Decl::IDNS_OrdinaryFriend)) + Actions.ActOnFinishInlineFunctionDef(FD); } /// ParseLexedMemberInitializers - We finished parsing the member specification |