[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) {
Function->setObjectOfFriendDecl();
if (FunctionTemplate)
FunctionTemplate->setObjectOfFriendDecl();
}
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.
Repository:
rL LLVM
https://reviews.llvm.org/D30375
More information about the cfe-commits
mailing list