[PATCH] D30375: Function with unparsed body is a definition

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 21 05:51:24 PDT 2017

sepavloff added a comment.

Initial commit (r305379) was reverted (r305381) because it broke self builds. The reason was not related to the WillHaveBody flag but was due to the change:

  if (isFriend) {
    if (FunctionTemplate)

Attempt to execute `FunctionTemplate->setObjectOfFriendDecl()` caused assertion violation because the declaration had `IDNS_NonMemberOperator` in its IdentifierNamespace. There is nothing wrong with this flag, `setObjectOfFriendDecl` must be updated accordingly. This is however a problem of friend function templates, it will be addressed in other patch. For now the call to  `setObjectOfFriendDecl` is made as previously, with the exception that it is called for `Function` prior to call to `CheckFunctionDeclaration`, as it is necessary for proper diagnostics.



More information about the cfe-commits mailing list