diff options
| author | Manman Ren <manman.ren@gmail.com> | 2016-09-06 18:16:54 +0000 | 
|---|---|---|
| committer | Manman Ren <manman.ren@gmail.com> | 2016-09-06 18:16:54 +0000 | 
| commit | c748359c14956ae6453435a7fa7659af0b46916b (patch) | |
| tree | db4eba535c7f2a223ef2f8340c56fc5a05331266 /clang/test | |
| parent | 4e463b4a2c34c9a98cdf408b3f57ea661209cf70 (diff) | |
| download | bcm5719-llvm-c748359c14956ae6453435a7fa7659af0b46916b.tar.gz bcm5719-llvm-c748359c14956ae6453435a7fa7659af0b46916b.zip  | |
Modules: Fix an assertion in DeclContext::buildLookup.
When calling getMostRecentDecl, we can pull in more definitions from
a module. We call getPrimaryContext afterwards to make sure that
we buildLookup on a primary context.
rdar://27926200
llvm-svn: 280728
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Modules/Inputs/lookup-assert/Base.h | 4 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/lookup-assert/Derive.h | 3 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/lookup-assert/H3.h | 1 | ||||
| -rw-r--r-- | clang/test/Modules/Inputs/lookup-assert/module.map | 4 | ||||
| -rw-r--r-- | clang/test/Modules/lookup-assert.m | 10 | 
5 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/Modules/Inputs/lookup-assert/Base.h b/clang/test/Modules/Inputs/lookup-assert/Base.h new file mode 100644 index 00000000000..8d5e06b4363 --- /dev/null +++ b/clang/test/Modules/Inputs/lookup-assert/Base.h @@ -0,0 +1,4 @@ +@interface BaseInterface +- (void) test; +@end + diff --git a/clang/test/Modules/Inputs/lookup-assert/Derive.h b/clang/test/Modules/Inputs/lookup-assert/Derive.h new file mode 100644 index 00000000000..313a96188d2 --- /dev/null +++ b/clang/test/Modules/Inputs/lookup-assert/Derive.h @@ -0,0 +1,3 @@ +#include "Base.h" +@interface DerivedInterface : BaseInterface +@end diff --git a/clang/test/Modules/Inputs/lookup-assert/H3.h b/clang/test/Modules/Inputs/lookup-assert/H3.h new file mode 100644 index 00000000000..3d8f878905d --- /dev/null +++ b/clang/test/Modules/Inputs/lookup-assert/H3.h @@ -0,0 +1 @@ +#include "Base.h" diff --git a/clang/test/Modules/Inputs/lookup-assert/module.map b/clang/test/Modules/Inputs/lookup-assert/module.map new file mode 100644 index 00000000000..e8a89eb095a --- /dev/null +++ b/clang/test/Modules/Inputs/lookup-assert/module.map @@ -0,0 +1,4 @@ +module X { +  header "H3.h" +  export * +} diff --git a/clang/test/Modules/lookup-assert.m b/clang/test/Modules/lookup-assert.m new file mode 100644 index 00000000000..2697fb15d01 --- /dev/null +++ b/clang/test/Modules/lookup-assert.m @@ -0,0 +1,10 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/lookup-assert %s -verify +// expected-no-diagnostics + +#include "Derive.h" +#import <H3.h> +@implementation DerivedInterface +- (void)test { +} +@end  | 

