sepavloff marked 3 inline comments as done.
sepavloff added a comment.
Thank you!
================
Comment at: lib/Sema/SemaDecl.cpp:11995-12006
+ for (auto I : FD->redecls()) {
+ if (I != FD && !I->isInvalidDecl() &&
+ I->getFriendObjectKind() != Decl::FOK_None) {
+ if (FunctionDecl *Original = I->getInstantiatedFromMemberFunction()) {
+ if (Original->isThisDeclarationADefinition()) {
+ Definition = I;
+ break;
----------------
rsmith wrote:
> We should include a comment here explaining why we need to do this (that is,
> why this doesn't just fall out from the normal `isDefined` check). You can
> just quote C++ [temp.inst]p2:
>
> > For the purpose of determining whether an instantiated redeclaration is
> > valid according to [basic.def.odr] and [class.mem], a declaration that
> > corresponds to a definition in the template is considered to be a
> > definition.
Thank you for the reference.
Repository:
rL LLVM
https://reviews.llvm.org/D30170
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits