aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenTypes.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-08-28 23:30:39 +0000
committerSteve Naroff <snaroff@apple.com>2007-08-28 23:30:39 +0000
commitb291ab60474e8f02f5d1245f77d3af31bcd4821c (patch)
treeca461ffeb3fe251f50f9913cc34663f930744aed /CodeGen/CodeGenTypes.cpp
parent7269f2d6cbe8c876aa5b007c35e4a3c3fed72cbd (diff)
Implement default argument promotions (for old-style function calls and variable argument lists).
[dylan:~/llvm/tools/clang] admin% cat x.c int printf(const char *, ...); int oldschool(); void foo() { float f; short i; printf("foo %f", 1.0f); oldschool(f,i); } [dylan:~/llvm/tools/clang] admin% ../../Debug/bin/clang x.c -parse-ast-dump int printf(char const *, ...); int oldschool(); void foo() (CompoundStmt 0x3105f00 (DeclStmt 0x3105ba0 0x3105ce0 "float f") (DeclStmt 0x3105c90 0x3105d10 "short i") (CallExpr 0x3105df0 'int' (ImplicitCastExpr 0x3105dc0 'int (*)(char const *, ...)' (DeclRefExpr 0x3105c20 'int (char const *, ...)' Decl='printf' 0x3105bd0)) (ImplicitCastExpr 0x3105dd0 'char const *' (StringLiteral 0x3105d60 'char *' "foo %f")) (ImplicitCastExpr 0x3105de0 'double' (FloatingLiteral 0x3105d80 'float' 1.000000))) (CallExpr 0x3105ed0 'int' (ImplicitCastExpr 0x3105ea0 'int (*)()' (DeclRefExpr 0x3105e20 'int ()' Decl='oldschool' 0x3105c40)) (ImplicitCastExpr 0x3105eb0 'double' (DeclRefExpr 0x3105e40 'float' Decl='f' 0x3105ce0)) (ImplicitCastExpr 0x3105ec0 'int' (DeclRefExpr 0x3105e60 'short' Decl='i' 0x3105d10)))) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41558 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CodeGen/CodeGenTypes.cpp')
0 files changed, 0 insertions, 0 deletions