summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaTemplate/deduction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implement [temp.deduct.type]p6: if the nested-name-specifier of a type isRichard Smith2015-12-301-0/+11
| | | | | | dependent, the type is a non-deduced context. llvm-svn: 256651
* [Sema] Be consistent about diagnostic wording: always use "cannot".Davide Italiano2015-08-151-1/+1
| | | | | | Discussed with Richard Smith. llvm-svn: 245162
* restore fix for 18645, buildbot apparently gave a false positive.Nathan Sidwell2015-01-161-0/+5
| | | | | | Correct logic concerning 'T &&' deduction against lvalues. llvm-svn: 226278
* reverting due to build bot failureNathan Sidwell2015-01-121-5/+0
| | | | llvm-svn: 225684
* fix pr18645. Correct logic concerning 'T &&' deduction against lvalues.Nathan Sidwell2015-01-101-0/+5
| | | | llvm-svn: 225587
* Another test for PR19372, showing why we need to keep checking arguments ↵Richard Smith2014-11-121-1/+2
| | | | | | after a pack expansion. llvm-svn: 221838
* Add another testcase.Richard Smith2014-11-121-0/+9
| | | | llvm-svn: 221833
* PR19372: Keep checking template arguments after we see an argument packRichard Smith2014-11-121-0/+14
| | | | | | | | expansion into a parameter pack; we know that we're still filling in that parameter's arguments. Previously, if we hit this case for an alias template, we'd try to substitute using non-canonical template arguments. llvm-svn: 221832
* PR21536: Fix a corner case where we'd get confused by a pack expanding into theRichard Smith2014-11-121-1/+17
| | | | | | | penultimate parameter of a template parameter list, where the last parameter is itself a pack, and build a bogus empty final pack argument. llvm-svn: 221748
* Fix grammatical error in diagnostic.Richard Smith2014-08-211-1/+1
| | | | llvm-svn: 216221
* Restore the C-style cast hack for enum template arguments,John McCall2011-07-151-0/+12
| | | | | | | | which is required given the current setup for template argument deduction substitution validation, and add a test case to make sure we don't break it in the future. llvm-svn: 135262
* When printing a qualified type, look through a substituted templateDouglas Gregor2011-02-171-1/+1
| | | | | | | | | | parameter type to see what's behind it, so that we don't end up printing silly things like "float const *" when "const float *" would make more sense. Also, replace the pile of "isa" tests with a simple switch enumerating all of the cases, making a few more obvious cases use prefix qualifiers. llvm-svn: 125729
* Enter the context of the declared function template when performingJohn McCall2010-10-121-0/+16
| | | | | | | deduction and the final substitution, but not while substituting the explicit template arguments. Fixes rdar://problem/8537391 llvm-svn: 116332
* When perform exact-qualifier-match template argument deduction,John McCall2010-08-281-0/+13
| | | | | | | properly account for the possibility that certain opaque types might be more qualified than they appear. Fixes PR7708. llvm-svn: 112390
* When deducing the element type of an array, ignore qualifiers ifJohn McCall2010-08-191-0/+8
| | | | | | the context allows us to ignore qualifiers on the array type itself. llvm-svn: 111486
* TDK_InconsistentQuals is really totally different from TDK_Inconsistent.John McCall2010-08-051-0/+8
| | | | | | | Rename it to TDK_Underqualified to avoid this sort of confusion and give it its own diagnostic. llvm-svn: 110318
* Wire up '-Wignored-qualifiers' to the warning on 'const' in 'const int f()'.Chandler Carruth2010-07-141-1/+1
| | | | | | | | | This flag and warning match GCC semantics. Also, move it to -Wextra as this is a largely cosmetic issue and doesn't seem to mask problems. Subsequent fixes to the tests which no longer by default emit the warning. Added explicit test cases for both C and C++ behavior with the warning turned on. llvm-svn: 108325
* When forming a function call or message send expression, be sure toDouglas Gregor2010-07-131-1/+8
| | | | | | | | | | | | | | | | | strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). llvm-svn: 108234
* Require a complete type before examining base classes during template argumentChandler Carruth2010-02-071-0/+12
| | | | | | | | | | deduction. This requires refactoring the deduction to have access to the Sema object instead of merely the ASTContext. Still leaves something to be desired due to poor source location. Fixes PR6257 and half of PR6259. llvm-svn: 95528
* More fixes to the handling of CVR-comparisons on array types. Adds a method toChandler Carruth2009-12-301-0/+5
| | | | | | | | | | | | QualType to get CVR-qualifiers through array types, and switches the primary comparison methods to use it. This may allow simplifying some of the callers of getUnqualifiedArrayType. Also fix the normalizing of CV-qualification during template deduction to normalize through arrays and allow a more qualified deduced array type. This fixes PR5911. llvm-svn: 92289
* 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
* Template argument deduction for template template parameters. ThisDouglas Gregor2009-11-111-0/+83
permits, among other things, ripping apart and reconstructing templates via partial specialization: template<typename T> struct DeepRemoveConst { typedef T type; }; template<typename T> struct DeepRemoveConst<const T> { typedef typename DeepRemoveConst<T>::type type; }; template<template<typename> class TT, typename T> struct DeepRemoveConst<TT<T> > { typedef TT<typename DeepRemoveConst<T>::type> type; }; Also, fix a longstanding thinko in the code handling partial ordering of class template partial specializations. We were performing the second deduction without clearing out the results of the first deduction. It's amazing we got through so much code with such a horrendous error :( llvm-svn: 86893
OpenPOWER on IntegriCloud