1 // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s 2 3 // PR6433 - Don't crash on va_arg(typedef). 4 typedef double gdouble; focus_changed_cb()5void focus_changed_cb () { 6 __builtin_va_list pa; 7 double mfloat; 8 mfloat = __builtin_va_arg((pa), gdouble); 9 } 10 11 void vararg(int, ...); function_as_vararg()12void function_as_vararg() { 13 // CHECK: define {{.*}}function_as_vararg 14 // CHECK-NOT: llvm.trap 15 vararg(0, focus_changed_cb); 16 } 17 vla(int n,...)18void vla(int n, ...) 19 { 20 __builtin_va_list ap; 21 void *p; 22 p = __builtin_va_arg(ap, typeof (int (*)[++n])); // CHECK: add nsw i32 {{.*}}, 1 23 } 24