summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/partial-spec-instantiate.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [Sema] Fix assertion when constructor is disabled with partially specialized ↵Volodymyr Sapsai2018-05-161-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | template. The added test case was triggering assertion > Assertion failed: (!SpecializedTemplate.is<SpecializedPartialSpecialization*>() && "Already set to a class template partial specialization!"), function setInstantiationOf, file clang/include/clang/AST/DeclTemplate.h, line 1825. It was happening with ClassTemplateSpecializationDecl `enable_if_not_same<int, int>`. Because this template is specialized for equal types not to have a definition, it wasn't instantiated and its specialization kind remained TSK_Undeclared. And because it was implicit instantiation, we didn't mark the decl as invalid. So when we try to find the best matching partial specialization the second time, we hit the assertion as partial specialization is already set. Fix by reusing stored partial specialization when available, instead of looking for the best match every time. rdar://problem/39524996 Reviewers: rsmith, arphaman Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46909 llvm-svn: 332509
* [Lit Test] Updated 20 Lit tests to be C++11 compatible.Charles Li2015-12-101-1/+8
| | | | | | | | This is the 5th Lit test patch. Expanded expected diagnostics to vary by C++ dialect. Expanded RUN line to: default, C++98/03 and C++11. llvm-svn: 255196
* When converting an integral template argument value to a non-typeDouglas Gregor2011-05-041-0/+10
| | | | | | | template parameter of type 'bool', force the value to be zero or one. Fixes <rdar://problem/9169404>. llvm-svn: 130873
* Partial and full specializations of a class template may have aDouglas Gregor2010-05-061-0/+20
| | | | | | | | | different tag kind ("struct" vs. "class") than the primary template, which has an affect on access control. Should fix the last remaining Boost.Accumulors failure. llvm-svn: 103144
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Keep track of the template arguments deduced when matching a classDouglas Gregor2009-08-021-0/+20
template partial specialization. Then, use those template arguments when instantiating members of that class template partial specialization. Fixes PR4607. llvm-svn: 77925
OpenPOWER on IntegriCloud