rnk added inline comments. ================ Comment at: include/clang/AST/ASTConsumer.h:58-64 @@ -57,5 +57,9 @@ /// \brief This callback is invoked each time an inline method definition is /// completed. virtual void HandleInlineMethodDefinition(CXXMethodDecl *D) {} + /// \brief This callback is invoked each time an inline friend function + /// definition is completed. + virtual void HandleInlineFriendFunctionDefinition(FunctionDecl *D) {} + ---------------- I'm pretty sure we can relax HandleInlineMethodDefinition to take a FunctionDecl and then we don't need the extra AST consumer callback.
================ Comment at: lib/Parse/ParseCXXInlineMethods.cpp:568-569 @@ -567,2 +567,4 @@ Actions.ActOnFinishInlineMethodDef(MD); + else if (auto *FD = dyn_cast_or_null<FunctionDecl>(LM.D)) + Actions.ActOnFinishInlineFriendFunctionDef(FD); } ---------------- 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. http://reviews.llvm.org/D15267 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits