[PATCH] D16989: Change interpretation of function definition in friend declaration of template class.

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 23:08:56 PDT 2016


sepavloff marked an inline comment as done.

================
Comment at: lib/Sema/SemaDecl.cpp:8652
@@ +8651,3 @@
+///
+bool Sema::shouldLinkDependentDeclWithPrevious(Decl *D, Decl *PrevDecl) {
+  DeclContext *LexicalDC = D->getLexicalDeclContext();
----------------
rsmith wrote:
> Most of the logic in this function can be replaced by something much simpler, such as
> 
>   `return !(D->getFriendObjectKind() && D->getLexicalDeclContext()->isDependentContext());`
> 
> Can you try to make such a simplification? Can we use the above as the criterion here?
Indeed, in negative form the condition is much simpler.
Thank you!


https://reviews.llvm.org/D16989





More information about the cfe-commits mailing list