hanchenye-llvm-project/clang/AST
Nate Begeman 1e36a85f64 Implement basic overload support via a new builtin, __builtin_overload.
__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded 
   functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.

The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin.  For example:

float a;
float sinf(float);
int   sini(int);

float b = __builtin_overload(1, a, sini, sinf);

Says that we are overloading functions that take one argument, and trying to 
pass an argument of the same type as 'a'.  sini() does not match since it takes
and argument of type int.  sinf does match, so at codegen time this will turn
into float b = sinf(a);

llvm-svn: 46132
2008-01-17 17:46:27 +00:00
..
ASTConsumer.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
ASTContext.cpp Fix ASTContext::typesAreCompatible when analyzing a function type with 2008-01-14 05:45:46 +00:00
Builtins.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
CFG.cpp Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdge 2008-01-11 00:40:29 +00:00
Decl.cpp Renamed getSynthesizedSelectorSize to getSynthesizedMethodSize. Compute method name 2008-01-17 17:37:26 +00:00
DeclSerialization.cpp Add first pieces of support for parsing and representing 2008-01-12 07:05:38 +00:00
Expr.cpp Implement basic overload support via a new builtin, __builtin_overload. 2008-01-17 17:46:27 +00:00
ExprCXX.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
Makefile remove attribution from makefiles. 2007-12-29 20:02:25 +00:00
Stmt.cpp Substituted all instances of the string "Objc" for "ObjC". This fixes 2008-01-07 19:49:32 +00:00
StmtDumper.cpp Substituted all instances of the string "Objc" for "ObjC". This fixes 2008-01-07 19:49:32 +00:00
StmtIterator.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
StmtPrinter.cpp Implement basic overload support via a new builtin, __builtin_overload. 2008-01-17 17:46:27 +00:00
StmtSerialization.cpp When serializing CompoundLiteralExpr, serialize out the file scope flag before 2008-01-14 18:29:39 +00:00
StmtViz.cpp Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and remove 2008-01-14 16:44:48 +00:00
TranslationUnit.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00
Type.cpp Simplify comment. 2008-01-16 23:56:32 +00:00
TypeSerialization.cpp Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:25 +00:00