зеркало из https://github.com/microsoft/clang-1.git
Make this test case more portable by removing its dependency on system header files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79511 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
04e8357f68
Коммит
caac0899b5
|
@ -1,10 +1,15 @@
|
|||
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region --verify %s
|
||||
// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref -analyzer-store=region --verify %s
|
||||
|
||||
// Test if the 'storage' region gets properly initialized after it is cast to
|
||||
// 'struct sockaddr *'.
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
typedef unsigned char __uint8_t;
|
||||
typedef unsigned int __uint32_t;
|
||||
typedef __uint32_t __darwin_socklen_t;
|
||||
typedef __uint8_t sa_family_t;
|
||||
typedef __darwin_socklen_t socklen_t;
|
||||
struct sockaddr { sa_family_t sa_family; };
|
||||
struct sockaddr_storage {};
|
||||
|
||||
void f(int sock) {
|
||||
struct sockaddr_storage storage;
|
||||
|
|
Загрузка…
Ссылка в новой задаче