aboutsummaryrefslogtreecommitdiff
path: root/Driver/PrintParserCallbacks.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-06 23:29:22 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-06 23:29:22 +0000
commiteaebc75ef6ff21fbc9f25ab4175cba465e4e0e43 (patch)
tree519fb271b86ee36b26d943a7011d0697ffdbaec1 /Driver/PrintParserCallbacks.cpp
parent1cd1b1e987f5e2f060d7972b13d83239b36d77d6 (diff)
Initial, rudimentary implementation of operator overloading for binary
operators. For example, one can now write "x + y" where x or y is a class or enumeration type, and Clang will perform overload resolution for "+" based on the overloaded operators it finds. The other kinds of overloadable operators in C++ will follow this same approach. Three major issues remain: 1) We don't find member operators 2) Since we don't have user-defined conversion operators, we can't call any of the built-in overloaded operators in C++ [over.built]. 3) Once we've done the semantic checks, we drop the overloaded operator on the floor; it doesn't get into the AST at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58821 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/PrintParserCallbacks.cpp')
-rw-r--r--Driver/PrintParserCallbacks.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Driver/PrintParserCallbacks.cpp b/Driver/PrintParserCallbacks.cpp
index 43dbf341e9..996051a21c 100644
--- a/Driver/PrintParserCallbacks.cpp
+++ b/Driver/PrintParserCallbacks.cpp
@@ -496,7 +496,8 @@ namespace {
return 0;
}
- virtual ExprResult ActOnBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
+ virtual ExprResult ActOnBinOp(Scope *S, SourceLocation TokLoc,
+ tok::TokenKind Kind,
ExprTy *LHS, ExprTy *RHS) {
llvm::cout << __FUNCTION__ << "\n";
return 0;