summaryrefslogtreecommitdiff
path: root/test/Modules/redecl-merge.m
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-22 21:40:42 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-22 21:40:42 +0000
commitc3cfd2ab3338d47861ece597212f21b972ebe727 (patch)
tree836c68f3c7a01079a4e278b86a9a8c1d6421dbb0 /test/Modules/redecl-merge.m
parente89fd1b30ae0c9f396b183f338d563757c26d3a8 (diff)
downloadclang-c3cfd2ab3338d47861ece597212f21b972ebe727.tar.gz
Serialize the AST reader's mapping from canonical declarations to the
set of (previously-canonical) declaration IDs to the module file, so that future AST reader instances that load the module know which declarations are merged. This is important in the fairly tricky case where a declaration of an entity, e.g., @class X; occurs before the import of a module that also declares that entity. We merge the declarations, and record the fact that the declaration of X loaded from the module was merged into the (now canonical) declaration of X that we parsed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147181 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/redecl-merge.m')
-rw-r--r--test/Modules/redecl-merge.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Modules/redecl-merge.m b/test/Modules/redecl-merge.m
index 930e8df6b8..ea04037707 100644
--- a/test/Modules/redecl-merge.m
+++ b/test/Modules/redecl-merge.m
@@ -58,13 +58,18 @@ void test_C3(C3 *c3) {
C4 *global_C4;
__import_module__ redecl_merge_left_left;
-void test_C4(C4 *c4) {
+void test_C4a(C4 *c4) {
global_C4 = c4 = get_a_C4();
accept_a_C4(c4);
}
__import_module__ redecl_merge_bottom;
+void test_C4b() {
+ if (&refers_to_C4) {
+ }
+}
+
@implementation B
+ (B*)create_a_B { return 0; }
@end