summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/temp_class_spec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement a specific diagnostic when a class template partialDouglas Gregor2010-02-091-0/+13
| | | | | | | specialization does not use any of its template parameters, then recover far more gracefully. Fixes PR6181. llvm-svn: 95629
* After dyn_cast'ing, it generally makes sense to check the *output* ofDouglas Gregor2010-01-141-0/+18
| | | | | | the dyn_cast against NULL rather than the *input*. Fixes PR6025. llvm-svn: 93435
* 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
* Implement partial ordering of class template partial specializations Douglas Gregor2009-09-151-2/+2
| | | | | | (C++ [temp.class.order]). llvm-svn: 81866
* Track a class template specialization's point of instantiation separatelyJohn McCall2009-09-111-3/+2
| | | | | | | | | | from its location. Initialize appropriately. When implicitly creating a declaration of a class template specialization after encountering the first reference to it, use the pattern class's location instead of the location of the first reference. llvm-svn: 81515
* Remove an obsolete kludge based on the previous, completely broken handling ↵Douglas Gregor2009-07-291-1/+1
| | | | | | of function templates llvm-svn: 77464
* Test redefinition of class template partial specializationsDouglas Gregor2009-07-291-1/+8
| | | | llvm-svn: 77463
* Fix the problems with template argument deduction and array types forDouglas Gregor2009-07-221-1/+14
| | | | | | | | real. It turns out that we need to actually move all of the qualifiers up to the array type itself, then recanonicalize the deduced template argument type. llvm-svn: 76788
* Canonicalize the types produced by template argument deduction.Douglas Gregor2009-07-221-0/+18
| | | | llvm-svn: 76777
* Slighty more testing for template argument deduction with array argumentsDouglas Gregor2009-07-221-0/+3
| | | | llvm-svn: 76774
* Improve template argument deduction for array types, so that a parameterDouglas Gregor2009-07-221-0/+29
| | | | | | | | | | const T can be matched with, e.g., volatile int [5] llvm-svn: 76773
* Update LLVM.Douglas Gregor2009-06-141-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Implement support for C++ Substitution Failure Is Not An Error (SFINAE), which says that errors that occur during template argument deduction do *not* produce diagnostics and do not necessarily make a program ill-formed. Instead, template argument deduction silently fails. This is currently implemented for template argument deduction during matching of class template partial specializations, although the mechanism will also apply to template argument deduction for function templates. The scheme is simple: - If we are in a template argument deduction context, any diagnostic that is considered a SFINAE error (or warning) will be suppressed. The error will be propagated up the call stack via the normal means. - By default, all warnings and errors are SFINAE errors. Add the NoSFINAE class to a diagnostic in the .td file to make it a hard error (e.g., for access-control violations). Note that, to make this fully work, every place in Sema that emits an error *and then immediately recovers* will need to check Sema::isSFINAEContext() to determine whether it must immediately return an error rather than recovering. llvm-svn: 73332
* Finish implementing checking of class template partial specializationsDouglas Gregor2009-06-121-0/+7
| | | | llvm-svn: 73260
* Diagnose the incorrect use of non-type template arguments for classDouglas Gregor2009-06-121-45/+0
| | | | | | template partial specializations. llvm-svn: 73254
* Once we have deduced the template arguments of a class templateDouglas Gregor2009-06-111-4/+51
| | | | | | | | | | | | partial specialization, substitute those template arguments back into the template arguments of the class template partial specialization to see if the results still match the original template arguments. This code is more general than it needs to be, since we don't yet diagnose C++ [temp.class.spec]p9. However, it's likely to be needed for function templates. llvm-svn: 73196
* Template argument deduction for member pointers.Douglas Gregor2009-06-101-0/+95
| | | | | | | Also, introduced some of the framework for performing instantiation as part of template argument deduction. llvm-svn: 73175
* Handle member pointer types with dependent class types (e.g., intDouglas Gregor2009-06-091-0/+10
| | | | | | T::*) and implement template instantiation for member pointer types. llvm-svn: 73151
* Address comments from Doug.Anders Carlsson2009-06-081-0/+2
| | | | llvm-svn: 73077
* Test template argument deduction on function types a little moreDouglas Gregor2009-06-081-0/+12
| | | | llvm-svn: 73072
* Template argument deduction for function types.Anders Carlsson2009-06-081-0/+32
| | | | llvm-svn: 73070
* Several improvements to template argument deduction:Douglas Gregor2009-06-051-0/+23
| | | | | | | | | | | | | | - Once we have deduced template arguments for a class template partial specialization, we use exactly those template arguments for instantiating the definition of the class template partial specialization. - Added template argument deduction for non-type template parameters. - Added template argument deduction for dependently-sized array types. With these changes, we can now implement, e.g., the remove_reference type trait. Also, Daniel's Ackermann template metaprogram now compiles properly. llvm-svn: 72909
* Template argument deduction for incomplete and constant array types. Doug, ↵Anders Carlsson2009-06-041-0/+30
| | | | | | please review. llvm-svn: 72844
* Template argument deduction for referencesDouglas Gregor2009-06-041-0/+13
| | | | llvm-svn: 72822
* When performing template argument deduction, ensure that multipleDouglas Gregor2009-06-041-0/+18
| | | | | | | | | | deductions of the same template parameter are equivalent. This allows us to implement the is_same type trait (!). Also, move template argument deduction into its own file and update a few build systems with this change (grrrr). llvm-svn: 72819
* Initial infrastructure for class template partial specialization. HereDouglas Gregor2009-05-311-0/+20
we have the basics of declaring and storing class template partial specializations, matching class template partial specializations at instantiation time via (limited) template argument deduction, and using the class template partial specialization's pattern for instantiation. This patch is enough to make a simple is_pointer type trait work, but not much else. llvm-svn: 72662
OpenPOWER on IntegriCloud