diff options
Diffstat (limited to 'test/Sema/implicit-builtin-decl.c')
-rw-r--r-- | test/Sema/implicit-builtin-decl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/Sema/implicit-builtin-decl.c b/test/Sema/implicit-builtin-decl.c index d7ec16953a09..3c2ff94984c0 100644 --- a/test/Sema/implicit-builtin-decl.c +++ b/test/Sema/implicit-builtin-decl.c @@ -1,7 +1,9 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: not %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s + void f() { int *ptr = malloc(sizeof(int) * 10); // expected-warning{{implicitly declaring library function 'malloc' with type}} \ - // expected-note{{please include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \ + // expected-note{{include the header <stdlib.h> or explicitly provide a declaration for 'malloc'}} \ // expected-note{{'malloc' is a builtin with type 'void *}} } @@ -57,3 +59,10 @@ void snprintf() { } void longjmp(); // expected-warning{{declaration of built-in function 'longjmp' requires inclusion of the header <setjmp.h>}} extern float fmaxf(float, float); + +struct __jmp_buf_tag {}; +void sigsetjmp(struct __jmp_buf_tag[1], int); // expected-warning{{declaration of built-in function 'sigsetjmp' requires inclusion of the header <setjmp.h>}} + +// CHECK: FunctionDecl {{.*}} <line:[[@LINE-2]]:1, col:44> col:6 sigsetjmp ' +// CHECK-NOT: FunctionDecl +// CHECK: ReturnsTwiceAttr {{.*}} <{{.*}}> Implicit |