Page MenuHomePhabricator

For MS ABI, emit dllexport friend functions defined inline in class
ClosedPublic

Authored by sberg on Dec 6 2015, 9:56 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

sberg updated this revision to Diff 42016.Dec 6 2015, 9:56 AM
sberg retitled this revision from to For MS ABI, emit dllexport friend functions defined inline in class.
sberg updated this object.
sberg added a reviewer: cfe-commits.
sberg edited reviewers, added: rnk; removed: cfe-commits.Jan 27 2016, 3:30 AM
sberg added a subscriber: cfe-commits.
rnk added inline comments.Jan 27 2016, 8:41 AM
include/clang/AST/ASTConsumer.h
58–64 ↗(On Diff #42016)

I'm pretty sure we can relax HandleInlineMethodDefinition to take a FunctionDecl and then we don't need the extra AST consumer callback.

lib/Parse/ParseCXXInlineMethods.cpp
568–569 ↗(On Diff #42016)

I'd check for the friend specification here rather than asserting later. There probably are or will eventually be ways to sneak a non-friend, non-method FunctionDecl into a class context.

sberg added inline comments.Jan 27 2016, 8:50 AM
include/clang/AST/ASTConsumer.h
58–64 ↗(On Diff #42016)

...and then also rename it from HandleInlineMethodDefinition to, say,HandleInlineFunctionDefinition? Or better stick with the (then no longer accurate) name?

rnk added inline comments.Jan 27 2016, 9:08 AM
include/clang/AST/ASTConsumer.h
58–64 ↗(On Diff #42016)

Renaming would be good if you're up for it. I have a feeling that nobody outside of Clang is overriding this ASTConsumer callback. It's purpose is very specific to dllexport.

sberg updated this revision to Diff 46227.Jan 27 2016, 11:42 PM

updated as discussed in the comments

sberg added a comment.Mar 2 2016, 5:40 AM

friendly ping

rnk accepted this revision.Mar 2 2016, 8:09 AM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Mar 2 2016, 8:09 AM
sberg added a comment.Mar 3 2016, 3:27 AM

Can you please push this, I do not have commit access. Thanks

This revision was automatically updated to reflect the committed changes.