aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/varargs.c
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-06-27 20:23:58 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-06-27 20:23:58 +0000
commit83ea530f9da1b8ca57773bf53418ce9fc98f46ac (patch)
tree0e914b2c37ee777b1bea473cf0040320a664daa4 /test/CodeGen/varargs.c
parent12d2cc71bfeb1e7be9ce00fc52feab50941cac24 (diff)
Check for non-POD vararg argument type after default argument promotion, not
before, so we don't incorrectly think arguments of function type are non-POD. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159290 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/varargs.c')
-rw-r--r--test/CodeGen/varargs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGen/varargs.c b/test/CodeGen/varargs.c
index b3dba240b5..b6973d8337 100644
--- a/test/CodeGen/varargs.c
+++ b/test/CodeGen/varargs.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -emit-llvm -o - %s
+// RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
// PR6433 - Don't crash on va_arg(typedef).
@@ -9,3 +9,9 @@ void focus_changed_cb () {
mfloat = __builtin_va_arg((pa), gdouble);
}
+void vararg(int, ...);
+void function_as_vararg() {
+ // CHECK: define {{.*}}function_as_vararg
+ // CHECK-NOT: llvm.trap
+ vararg(0, focus_changed_cb);
+}