Skip to content

Commit 91c4757

Browse files
committed
[modules] Add a regression test for merging anon decls in extern C contexts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316444 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b4bdd6a commit 91c4757

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// RUN: rm -rf %t
2+
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -verify %s
3+
// expected-no-diagnostics
4+
5+
#pragma clang module build sys_types
6+
module sys_types {}
7+
#pragma clang module contents
8+
#pragma clang module begin sys_types
9+
extern "C" {
10+
typedef union { bool b; } pthread_mutex_t;
11+
}
12+
#pragma clang module end
13+
#pragma clang module endbuild
14+
15+
typedef union { bool b; } pthread_mutex_t;
16+
#pragma clang module import sys_types
17+
18+
const pthread_mutex_t *m;
19+

0 commit comments

Comments
 (0)