[PATCH] D28399: PR31469: Don't add friend template class decls to redecl chain in dependent contexts.

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 6 07:11:25 PST 2017


v.g.vassilev created this revision.
v.g.vassilev added a reviewer: rsmith.
v.g.vassilev added a subscriber: cfe-commits.
v.g.vassilev set the repository for this revision to rL LLVM.

Fixes a crash in modules where the template class decl becomes the most recent decl in the redeclaration chain and forcing the template instantiator try to instantiate the friend declaration, rather than the template definition.

In practice, A::list<int> produces a TemplateSpecializationType A::__1::list<int, allocator<type-parameter-0-0> >' failing to replace to subsitute the default argument to allocator<int>.


Repository:
  rL LLVM

https://reviews.llvm.org/D28399

Files:
  include/clang/AST/DeclTemplate.h
  lib/AST/ASTImporter.cpp
  lib/AST/DeclTemplate.cpp
  lib/Sema/SemaTemplate.cpp
  lib/Sema/SemaTemplateInstantiateDecl.cpp
  test/Misc/ast-dump-decl.cpp
  test/Modules/Inputs/PR31469/empty.h
  test/Modules/Inputs/PR31469/module.modulemap
  test/Modules/Inputs/PR31469/textual.h
  test/Modules/Inputs/PR31469/textual_file_shadow.h
  test/Modules/pr31469.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28399.83363.patch
Type: text/x-patch
Size: 6683 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170106/0bf2bef2/attachment-0001.bin>


More information about the cfe-commits mailing list