Eric Christopher | b06cf89 | 2011-08-16 21:41:35 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s |
2 | // rdar://7309675 | ||||
3 | // PR4678 | ||||
4 | |||||
5 | // test1 should be compmiled to be a varargs function in the IR even | ||||
6 | // though there is no way to do a va_begin. Otherwise, the optimizer | ||||
7 | // will warn about 'dropped arguments' at the call site. | ||||
8 | |||||
9 | // CHECK: define i32 @_Z5test1z(...) | ||||
10 | int test1(...) { | ||||
11 | return -1; | ||||
12 | } | ||||
13 | |||||
14 | // CHECK: call i32 (...)* @_Z5test1z(i32 0) | ||||
15 | void test() { | ||||
16 | test1(0); | ||||
17 | } |