diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-01 23:45:03 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-01 23:45:03 +0000 |
commit | f5cfc89ea46cf20b4d5b5c42568e9ba6a4bbdd80 (patch) | |
tree | afc6d809a732901cb2d9e4724da9f86285ffe957 /test/Modules | |
parent | 288c75597c8cb0f96c416dd099b966a043ed86b1 (diff) |
Merge "special" types from different modules in the AST reader.
Different modules may have different views of the various "special"
types in the AST, such as the redefinition type for "id". Merge those
types rather than only considering the redefinition types for the
first AST file loaded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/Inputs/module.map | 4 | ||||
-rw-r--r-- | test/Modules/Inputs/weird_objc.h | 1 | ||||
-rw-r--r-- | test/Modules/objc_redef.m | 13 |
3 files changed, 18 insertions, 0 deletions
diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map index 5ec595c9e1..55496fa35a 100644 --- a/test/Modules/Inputs/module.map +++ b/test/Modules/Inputs/module.map @@ -155,3 +155,7 @@ module autolink { link framework "autolink_framework" } } + +module weird_objc { + header "weird_objc.h" +} diff --git a/test/Modules/Inputs/weird_objc.h b/test/Modules/Inputs/weird_objc.h new file mode 100644 index 0000000000..8acaf746e8 --- /dev/null +++ b/test/Modules/Inputs/weird_objc.h @@ -0,0 +1 @@ +typedef struct objc_object { void *super; int wibble; } *id; diff --git a/test/Modules/objc_redef.m b/test/Modules/objc_redef.m new file mode 100644 index 0000000000..13a5b1d9cc --- /dev/null +++ b/test/Modules/objc_redef.m @@ -0,0 +1,13 @@ +@import redeclarations_left; +@import weird_objc; + +int test(id x) { + return x->wibble; +} + +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -emit-module -fmodule-name=redeclarations_left %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -x objective-c -fmodule-cache-path %t -emit-module -fmodule-name=weird_objc %S/Inputs/module.map +// RUN: %clang_cc1 -fmodules -fmodule-cache-path %t %s -verify +// expected-no-diagnostics + |