by Jonathan Gray and Krister Walfridsson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75268
91177308-0d34-0410-b5e6-
96231b3b80d8
// 'struct sockaddr *'.
#include <sys/socket.h>
+#include <sys/types.h>
+
void f(int sock) {
struct sockaddr_storage storage;
struct sockaddr* sockaddr = (struct sockaddr*)&storage;
// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log &&
// RUN: grep 'clang-cc" "-triple" "x86_64-pc-dragonfly"' %t.log &&
// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log &&
-// RUN: grep 'ld" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" "crtbegin.o" ".*\.o" "-L.*/gcc.*" .* "-lc" "-lgcc" ".*crtend.o" ".*crtn.o"' %t.log &&
+// RUN: grep 'ld" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" ".*crtbegin.o" ".*\.o" "-L.*/gcc.*" .* "-lc" "-lgcc" ".*crtend.o" ".*crtn.o"' %t.log &&
// RUN: true
// RUN: cat %t.log &&
// RUN: grep 'clang-cc" "-triple" "powerpc64-pc-freebsd8"' %t.log &&
// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log &&
-// RUN: grep 'ld" "--eh-frame-hdr" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" "crtbegin.o" ".*\.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" ".*crtend.o" ".*crtn.o"' %t.log &&
+// RUN: grep 'ld" "--eh-frame-hdr" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" ".*crtbegin.o" ".*\.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" ".*crtend.o" ".*crtn.o"' %t.log &&
// RUN: true
// RUN: clang-cc -fsyntax-only -verify -Wformat=2 %s
#include <stdio.h>
+#include <stdarg.h>
const char *foo(const char *format) __attribute__((format_arg(1)));