Fix import of class templates partial specialization
authorGabor Marton <martongabesz@gmail.com>
Wed, 22 Aug 2018 11:52:14 +0000 (11:52 +0000)
committerGabor Marton <martongabesz@gmail.com>
Wed, 22 Aug 2018 11:52:14 +0000 (11:52 +0000)
commit42e15deb6c7b4c4794f19fdf81a37338bfcd7cd9
tree4e29abc8923bfe44064461bfb38865d55945ff47
parentc5e44c1805716316e95eded8bf014649ac69d5bd
Fix import of class templates partial specialization

Summary:
Currently there are several issues with the import of class template
specializations.  (1) Different TUs may have class template specializations
with the same template arguments, but with different set of instantiated
MethodDecls and FieldDecls.  In this patch we provide a fix to merge these
methods and fields.  (2) Currently, we search the partial template
specializations in the set of simple specializations and we add partial
specializations as simple specializations. This is bad, this patch fixes it.

Reviewers: a_sidorin, xazax.hun, r.stahl

Subscribers: rnkovacs, dkrupp, cfe-commits

Differential Revision: https://reviews.llvm.org/D50451

llvm-svn: 340402
clang/include/clang/ASTMatchers/ASTMatchers.h
clang/lib/AST/ASTImporter.cpp
clang/lib/ASTMatchers/ASTMatchersInternal.cpp
clang/unittests/AST/ASTImporterTest.cpp