History log of /external/clang/test/SemaTemplate/deduction.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4e9272de54094da012d49990acaf06553369d6ec 15-Jul-2011 John McCall <rjmccall@apple.com> Restore the C-style cast hack for enum template arguments,
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135262 91177308-0d34-0410-b5e6-96231b3b80d8
c6daf0b29d6c48a99cb1ad707973a7e6dfcafd58 17-Feb-2011 Douglas Gregor <dgregor@apple.com> When printing a qualified type, look through a substituted template
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125729 91177308-0d34-0410-b5e6-96231b3b80d8
df41f18936693f7c62e457eefb9fad5b2d2fe3cd 12-Oct-2010 John McCall <rjmccall@apple.com> Enter the context of the declared function template when performing
deduction and the final substitution, but not while substituting the
explicit template arguments. Fixes rdar://problem/8537391

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116332 91177308-0d34-0410-b5e6-96231b3b80d8
cd05e81e2e2640a0a0097658c660afc6c8a9f4fd 29-Aug-2010 John McCall <rjmccall@apple.com> When perform exact-qualifier-match template argument deduction,
properly account for the possibility that certain opaque types
might be more qualified than they appear. Fixes PR7708.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112390 91177308-0d34-0410-b5e6-96231b3b80d8
e4f26e54d81fb1987333132fe34cd927e62c803c 19-Aug-2010 John McCall <rjmccall@apple.com> When deducing the element type of an array, ignore qualifiers if
the context allows us to ignore qualifiers on the array type itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111486 91177308-0d34-0410-b5e6-96231b3b80d8
57e97786433e70197a089360228d8f0d82e3ad4c 05-Aug-2010 John McCall <rjmccall@apple.com> TDK_InconsistentQuals is really totally different from TDK_Inconsistent.
Rename it to TDK_Underqualified to avoid this sort of confusion and give it
its own diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110318 91177308-0d34-0410-b5e6-96231b3b80d8
5495f37302f7c82192dab1ce8d9c9fe76ed0ee37 14-Jul-2010 Chandler Carruth <chandlerc@gmail.com> Wire up '-Wignored-qualifiers' to the warning on 'const' in 'const int f()'.
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108325 91177308-0d34-0410-b5e6-96231b3b80d8
5291c3cec0dbe8ad1d8e7e67e93af2b1586d5400 13-Jul-2010 Douglas Gregor <dgregor@apple.com> When forming a function call or message send expression, be sure to
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108234 91177308-0d34-0410-b5e6-96231b3b80d8
a7ef13024e4cc3dfb75e3bc1695371b39d9a5240 07-Feb-2010 Chandler Carruth <chandlerc@gmail.com> Require a complete type before examining base classes during template argument
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95528 91177308-0d34-0410-b5e6-96231b3b80d8
e724246b9f655801bd96b727daf9dddc44beef4d 30-Dec-2009 Chandler Carruth <chandlerc@gmail.com> More fixes to the handling of CVR-comparisons on array types. Adds a method to
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

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92289 91177308-0d34-0410-b5e6-96231b3b80d8
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- 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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
db0d4b751e83b8841b8f48f913f17e50467f13d4 12-Nov-2009 Douglas Gregor <dgregor@apple.com> Template argument deduction for template template parameters. This
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 :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86893 91177308-0d34-0410-b5e6-96231b3b80d8