[PATCH] D23016: Enhance treatment of function specializations in friend declarations

Serge Pavlov via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 07:47:41 PDT 2016


sepavloff created this revision.
sepavloff added a subscriber: cfe-commits.

Function specializations used in friend declarations in class templates, like:
```
    template<typename T> class C1 {
        friend void func<>(int);
```
previously were processed incorrectly: class instantiation made them ordinary
functions and they were not placed into redeclaration chains correctly. This
change repairs specialization treatment.

This change fixes PR12994.

https://reviews.llvm.org/D23016

Files:
  lib/AST/DeclTemplate.cpp
  lib/Sema/SemaAccess.cpp
  lib/Sema/SemaTemplateInstantiateDecl.cpp
  test/SemaCXX/friend-spec.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23016.66321.patch
Type: text/x-patch
Size: 6440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160801/84f0ac06/attachment.bin>


More information about the cfe-commits mailing list