diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-01-26 00:35:08 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-01-26 00:35:08 +0000 |
commit | 01a41140cd8ec9475ed0c33384310fbdd3b6de11 (patch) | |
tree | c14db552cc993c35c59e4477a3f7b7656b149ce0 /test/PCH/undefined-internal.c | |
parent | 3ac83d69c61238cd0d38e90fcdd03390530ab2fb (diff) | |
download | clang-01a41140cd8ec9475ed0c33384310fbdd3b6de11.tar.gz |
Preserve Sema::UndefinedInternals across PCH boundaries. Fixes
-Wundefined-internal warnings with PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/PCH/undefined-internal.c')
-rw-r--r-- | test/PCH/undefined-internal.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/PCH/undefined-internal.c b/test/PCH/undefined-internal.c new file mode 100644 index 0000000000..ef514606dc --- /dev/null +++ b/test/PCH/undefined-internal.c @@ -0,0 +1,15 @@ +// RUN: %clang_cc1 -emit-pch %s -o %t +// RUN: %clang_cc1 -include-pch %t %s -verify +#ifndef HEADER_H +#define HEADER_H +static void f(); +static void g(); +void h() { + f(); + g(); +} +#else +static void g() {} +// expected-warning@5{{function 'f' has internal linkage but is not defined}} +// expected-note@8{{used here}} +#endif |