Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protocol redefinition to the current scope/context
Not doing so causes the AST writter to assert since the decl in question never gets emitted. This is fine when modules is not used, but otherwise we need to serialize something other than garbage. rdar://problem/39844933 Differential Revision: https://reviews.llvm.org/D47297 llvm-svn: 336031
- Loading branch information
1 parent
7c557f8
commit 7dcf23e
Showing
6 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
clang/test/Modules/Inputs/protocol-redefinition/Base.framework/Headers/Base.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@protocol Foo | ||
- (void)someMethodOnFoo; | ||
@end |
4 changes: 4 additions & 0 deletions
4
clang/test/Modules/Inputs/protocol-redefinition/Base.framework/Modules/module.modulemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
framework module Base { | ||
header "Base.h" | ||
export * | ||
} |
6 changes: 6 additions & 0 deletions
6
clang/test/Modules/Inputs/protocol-redefinition/Kit.framework/Headers/Kit.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#import <Base/Base.h> | ||
|
||
// REDECLARATION | ||
@protocol Foo | ||
- (void)someMethodOnFoo; | ||
@end |
4 changes: 4 additions & 0 deletions
4
clang/test/Modules/Inputs/protocol-redefinition/Kit.framework/Modules/module.modulemap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
framework module Kit { | ||
header "Kit.h" | ||
export * | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// RUN: rm -rf %t | ||
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -F%S/Inputs/protocol-redefinition -fsyntax-only %s -Wno-private-module -verify | ||
|
||
// expected-no-diagnostics | ||
|
||
@import Kit; |