forked from OSchip/llvm-project
a11693bc37
functions for built-in operators, e.g., the builtin bool operator==(int const*, int const*) can be used for the expression "x1 == x2" given: struct X { operator int const*(); } x1, x2; The scheme for handling these built-in operators is relatively simple: for each candidate required by the standard, create a special kind of candidate function for the built-in. If overload resolution picks the built-in operator, we perform the appropriate conversions on the arguments and then let the normal built-in operator take care of it. There may be some optimization opportunity left: if we can reduce the number of built-in operator overloads we generate, overload resolution for these cases will go faster. However, one must be careful when doing this: GCC generates too few operator overloads in our little test program, and fails to compile it because none of the overloads it generates match. Note that we only support operator overload for non-member binary operators at the moment. The other operators will follow. As part of this change, ImplicitCastExpr can now be an lvalue. llvm-svn: 59148 |
||
---|---|---|
.. | ||
ASTConsumers.cpp | ||
ASTConsumers.h | ||
Analyses.def | ||
AnalysisConsumer.cpp | ||
AnalysisConsumer.h | ||
Backend.cpp | ||
CMakeLists.txt | ||
CacheTokens.cpp | ||
DependencyFile.cpp | ||
DiagChecker.cpp | ||
HTMLPrint.cpp | ||
Makefile | ||
PrintParserCallbacks.cpp | ||
PrintPreprocessedOutput.cpp | ||
RewriteBlocks.cpp | ||
RewriteMacros.cpp | ||
RewriteObjC.cpp | ||
RewriteTest.cpp | ||
SerializationTest.cpp | ||
clang.cpp | ||
clang.h |