llvm-project/clang/lib
Douglas Gregor 436424cfa5 Partial expansion of C++ operator overloading (for binary operators)
to support operators defined as member functions, e.g.,

  struct X { 
    bool operator==(X&);
  };

Overloading with non-member operators is supported, and the special
rules for the implicit object parameter (e.g., the ability for a
non-const *this to bind to an rvalue) are implemented.

This change also refactors and generalizes the code for adding
overload candidates for overloaded operator calls (C++ [over.match.expr]),
both to match the rules more exactly (name lookup of non-member
operators actually ignores member operators) and to make this routine
more reusable for the other overloaded operators.

Testing for the initialization of the implicit object parameter is
very light. More tests will come when we get support for calling
member functions directly (e.g., o.m(a1, a2)).

llvm-svn: 59564
2008-11-18 23:14:02 +00:00
..
AST Extend DeclarationName to support C++ overloaded operators, e.g., 2008-11-18 14:39:36 +00:00
Analysis handle the case that the array element is of structure type when bind the whole array to a single value (for example, UnknownVal, UndefinedVal). 2008-11-18 13:11:04 +00:00
Basic Extend DeclarationName to support C++ overloaded operators, e.g., 2008-11-18 14:39:36 +00:00
CodeGen Patch for generation of weak write barriers for objc 2008-11-18 22:37:34 +00:00
Driver This reworks some of the Diagnostic interfaces a bit to change how diagnostics 2008-11-18 07:04:44 +00:00
Headers #define NULL as 0 when compiling as C++. This fixes the carbon.cpp and cocoa.mm test failures. 2008-11-04 06:53:14 +00:00
Lex Remove the last of the old-style Preprocessor::Diag methods. 2008-11-18 21:48:13 +00:00
Parse Remove the last of the old-style Preprocessor::Diag methods. 2008-11-18 21:48:13 +00:00
Rewrite CMake: Builds and installs clang binary and libs (no docs yet). It 2008-10-26 00:56:18 +00:00
Sema Partial expansion of C++ operator overloading (for binary operators) 2008-11-18 23:14:02 +00:00
CMakeLists.txt CMake: Builds and installs clang binary and libs (no docs yet). It 2008-10-26 00:56:18 +00:00
Makefile add a libDriver, for now only move the text diangostics stuff from Driver to there 2008-08-05 23:33:20 +00:00