llvm-project/clang/test/SemaTemplate
Douglas Gregor 5ab1165531 Improve our handling of user-defined conversions as part of overload
resolution. There are two sources of problems involving user-defined
conversions that this change eliminates, along with providing simpler
interfaces for checking implicit conversions:

  - It eliminates a case of infinite recursion found in Boost.

  - It eliminates the search for the constructor needed to copy a temporary
    generated by an implicit conversion from overload
    resolution. Overload resolution assumes that, if it gets a value
    of the parameter's class type (or a derived class thereof), there
    is a way to copy if... even if there isn't. We now model this
    properly.

llvm-svn: 101680
2010-04-17 22:01:05 +00:00
..
ackermann.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
ambiguous-ovl-print.cpp Improve the reporting of non-viable overload candidates by noting the reason 2010-01-13 00:25:19 +00:00
anonymous-union.cpp Add test case for PR5868, and improve location information slightly for implicit "this" expressions 2009-12-24 20:23:34 +00:00
canonical-expr-type-0x.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
canonical-expr-type.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
class-template-ctor-initializer.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
class-template-decl.cpp Fix a crash-on-invalid involving name lookup of tag names, where we 2010-04-12 16:00:01 +00:00
class-template-id-2.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
class-template-id.cpp Switch the initialization required by return statements over to the 2009-12-18 05:02:21 +00:00
class-template-spec.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
constructor-template.cpp Improve our handling of user-defined conversions as part of overload 2010-04-17 22:01:05 +00:00
copy-ctor-assign.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
current-instantiation.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
deduction.cpp Require a complete type before examining base classes during template argument 2010-02-07 21:33:28 +00:00
default-arguments-cxx0x.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
default-arguments.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
default-expr-arguments-2.cpp Be sure to instantiate the parameters of a function, even when the 2010-04-12 07:48:19 +00:00
default-expr-arguments.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
dependent-base-classes.cpp Improve diagnostics when an elaborated-type-specifer containing a 2010-03-31 23:17:41 +00:00
dependent-base-member-init.cpp Another test case for PR6062 2010-01-19 06:47:24 +00:00
dependent-expr.cpp When determining whether a DeclRefExpr is value-dependent when it 2010-01-15 16:21:02 +00:00
dependent-names.cpp Turn access control on by default in -cc1. 2010-04-09 19:03:51 +00:00
dependent-sized_array.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
dependent-type-identity.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
destructor-template.cpp Use CXXPseudoDestructorExpr as the stored representation for dependent 2010-02-25 01:56:36 +00:00
enum-argument.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
example-dynarray.cpp Update tests to use %clang instead of 'clang', and forcibly disable use of ' 2009-12-15 22:01:24 +00:00
example-typelist.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
explicit-instantiation.cpp Skip implicit instantiation of templated variables where a more recent 2010-02-13 10:17:50 +00:00
explicit-specialization-member.cpp Fix some redundant errors by changing CXXScopeSpec::isSet calls into 2010-04-07 23:29:58 +00:00
ext-vector-type.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
extern-templates.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
fibonacci.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
friend-template.cpp Properly instantiate friend class template declarations and link them into 2010-03-25 06:39:04 +00:00
friend.cpp Fix a crash-on-invalid involving name lookup of tag names, where we 2010-04-12 16:00:01 +00:00
fun-template-def.cpp Improve diagnostics when we fail to convert from a source type to a 2010-04-09 00:35:39 +00:00
function-template-specialization.cpp When performing name lookup into a scope, check that its entity is 2010-01-11 22:40:45 +00:00
implicit-instantiation-1.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
injected-class-name.cpp Create a new InjectedClassNameType to represent bare-word references to the 2010-03-10 03:28:59 +00:00
instantiate-anonymous-union.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-array.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-attr.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-c99.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-call.cpp Introduce a centralized routine in Sema for diagnosing failed lookups (when 2009-12-16 08:11:27 +00:00
instantiate-case.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-cast.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiate-clang.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-complete.cpp When a member pointer is dereferenced, the class it points into must be complete. Enforce this. 2010-04-10 10:14:54 +00:00
instantiate-decl-dtor.cpp Make sure we instantiate the destructor for variables initialized by 2009-12-20 22:29:11 +00:00
instantiate-decl-init.cpp A dependent initializer with zero arguments should return a NULL 2010-02-05 07:56:11 +00:00
instantiate-declref-ice.cpp Migrate the mish-mash of declaration checks in 2010-02-09 07:26:29 +00:00
instantiate-declref.cpp Improve diagnostics when an elaborated-type-specifer containing a 2010-03-31 23:17:41 +00:00
instantiate-deeply.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-default-assignment-operator.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-dependent-nested-name.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-elab-type-specifier.cpp Change the representation of dependent elaborated-type-specifiers 2010-03-31 22:19:08 +00:00
instantiate-enum-2.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-enum.cpp When instantiating a function-scoped enum, make sure that it and its 2010-03-01 19:00:07 +00:00
instantiate-exception-spec.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiate-expr-1.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiate-expr-2.cpp Collapse the three separate initialization paths in 2010-04-16 22:09:46 +00:00
instantiate-expr-3.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-expr-4.cpp Re-bind non-dependent CXXTemporaryObjectExpr nodes as temporaries when 2010-03-31 18:34:58 +00:00
instantiate-expr-5.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-expr-basic.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-field.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiate-friend-class.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-function-1.cpp Fix a self-host problem caused by this over-eager assertion. I'm not sure 2010-03-11 09:33:17 +00:00
instantiate-function-1.mm Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-function-2.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-function-params.cpp Make CXXScopeSpec invalid when incomplete, and propagate that into any 2010-04-08 16:38:48 +00:00
instantiate-init.cpp When pulling apart an initializer that involves a CXXConstructExpr, do 2010-03-24 21:22:47 +00:00
instantiate-invalid.cpp Robustify instantiation of templates when there are errors in the 2010-03-01 18:27:54 +00:00
instantiate-local-class.cpp Turn access control on by default in -cc1. 2010-04-09 19:03:51 +00:00
instantiate-member-class.cpp Turn access control on by default in -cc1. 2010-04-09 19:03:51 +00:00
instantiate-member-expr.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiate-member-initializers.cpp Diagnose misordered initializers in constructor templates immediately instead of 2010-04-10 07:37:23 +00:00
instantiate-member-pointers.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-member-template.cpp Cope with finding the "instantiated" declaration when we are 2010-02-05 22:40:03 +00:00
instantiate-method.cpp Mark a function declaration invalid if any of its parameter declarations 2010-04-14 01:27:20 +00:00
instantiate-non-type-template-parameter.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-objc-1.mm Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-overloaded-arrow.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-static-var.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiate-subscript.cpp Improve the lead diagnostic for C++ object subscript expressions with 2010-01-07 02:04:15 +00:00
instantiate-template-template-parm.cpp In Sema::CheckInitializerTypes, replace a use of CheckReferenceInit with an InitializationSequence 2009-12-16 16:54:16 +00:00
instantiate-try-catch.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-type.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiate-typedef.cpp Make CXXScopeSpec invalid when incomplete, and propagate that into any 2010-04-08 16:38:48 +00:00
instantiate-using-decl.cpp Turn access control on by default in -cc1. 2010-04-09 19:03:51 +00:00
instantiation-backtrace.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiation-default-1.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
instantiation-default-2.cpp Overhaul checking of non-type template arguments that should refer to 2010-04-01 18:32:35 +00:00
instantiation-default-3.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
instantiation-depth.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
member-access-expr.cpp Use CXXPseudoDestructorExpr as the stored representation for dependent 2010-02-25 01:56:36 +00:00
member-function-template.cpp Fix two issues with the substitution of template template parameters 2010-02-05 19:54:12 +00:00
member-initializers.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
member-template-access-expr.cpp When determining whether the type is the current instantiation, strip 2010-01-15 16:05:33 +00:00
metafun-apply.cpp When pretty-printing tag types, only print the tag if we're in C (and 2010-03-10 11:27:22 +00:00
nested-linkage.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
nested-name-spec-template.cpp Fix an assertion-on-error during tentative constructor parsing by 2010-02-26 08:45:28 +00:00
nested-template.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
operator-function-id-template.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
operator-template.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
overload-uneval.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
partial-spec-instantiate.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
qualified-id.cpp Turn access control on by default in -cc1. 2010-04-09 19:03:51 +00:00
qualified-names-diag.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
recursive-template-instantiation.cpp Note that an overload candidate was non-viable because template argument 2010-02-01 18:53:26 +00:00
temp.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_arg.cpp Explain that a template needs arguments to make it into a type, for 2010-04-08 21:04:54 +00:00
temp_arg_nontype.cpp Always diagnose and complain about problems in 2010-04-14 23:11:21 +00:00
temp_arg_template.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_arg_type.cpp When a template (without arguments) is passed as a template type 2010-04-08 00:03:06 +00:00
temp_class_order.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_class_spec.cpp Implement a specific diagnostic when a class template partial 2010-02-09 00:37:32 +00:00
temp_class_spec_blocks.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_class_spec_neg.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_explicit.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_explicit_cxx0x.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
temp_func_order.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
template-class-traits.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
template-decl-fail.cpp Downgrade the "declaration does not declare anything" error to a 2010-04-08 21:33:23 +00:00
template-id-expr.cpp When we're parsing an expression that may have looked like a 2010-02-05 19:11:37 +00:00
template-id-printing.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
typename-specifier-2.cpp Switch file-scope assignment initialization over to InitializationSequence. 2009-12-22 02:10:53 +00:00
typename-specifier-3.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
typename-specifier-4.cpp Robustify callers that rebuild typename type nodes again NULL return 2010-03-07 23:26:22 +00:00
typename-specifier.cpp Make CXXScopeSpec invalid when incomplete, and propagate that into any 2010-04-08 16:38:48 +00:00
typo-dependent-name.cpp When determining whether a given name is a template in a dependent 2010-01-12 17:06:20 +00:00
value-dependent-null-pointer-constant.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
variadic-class-template-1.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
variadic-class-template-2.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
variadic-parse.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
variadic-unsupported.cpp Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'. 2009-12-15 20:14:24 +00:00
virtual-member-functions.cpp Perform access control even for the implicit destructor calls from implicit 2010-03-16 05:36:30 +00:00