Commit Graph

4 Commits

Author SHA1 Message Date
Douglas Gregor e254f90d94 Initial implementation of argument dependent lookup (a.k.a. ADL,
a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for
two:

  - In an unqualified call g(x), even if the name does not refer to
    anything in the current scope, we can still find functions named
    "g" based on ADL. We don't yet have this ability.
  - ADL will need updating for friend functions and templates.

llvm-svn: 63692
2009-02-04 00:32:51 +00:00
Douglas Gregor cba844dae6 Test explicit constructor
llvm-svn: 62237
2009-01-14 18:02:48 +00:00
Douglas Gregor 2fe9883a96 Standard conversion sequences now have a CopyConstructor field, to
cope with the case where a user-defined conversion is actually a copy
construction, and therefore can be compared against other standard
conversion sequences. While I called this a hack before, now I'm
convinced that it's the right way to go.

Compare overloads based on derived-to-base conversions that invoke
copy constructors. 

Suppress user-defined conversions when attempting to call a
user-defined conversion.

llvm-svn: 58629
2008-11-03 19:09:14 +00:00
Douglas Gregor 26bee0b326 Implement basic support for converting constructors in user-defined
conversions.

Notes:
  - Overload resolution for converting constructors need to prohibit
    user-defined conversions (hence, the test isn't -verify safe yet).
  - We still use hacks for conversions from a class type to itself. 
    This will be the case until we start implicitly declaring the appropriate
    special member functions. (That's next on my list)

llvm-svn: 58513
2008-10-31 16:23:19 +00:00