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

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 1 14:39:23 PDT 2016


rsmith added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:8652
@@ +8651,3 @@
+///
+bool Sema::shouldLinkDependentDeclWithPrevious(Decl *D, Decl *PrevDecl) {
+  DeclContext *LexicalDC = D->getLexicalDeclContext();
----------------
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?


https://reviews.llvm.org/D16989





More information about the cfe-commits mailing list