From: Graydon Hoare Date: Thu, 29 Jun 2017 19:42:35 +0000 (+0000) Subject: [ASTReader] Add test for previous change r306583 / 145692e. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f832c35ecbbbe989774fd6b1e4fd84a8199b5dcd;p=clang [ASTReader] Add test for previous change r306583 / 145692e. Summary: Add a test for the change to ASTReader that reproduces the logic for consolidating multiple ObjC interface definitions to the case of multiple ObjC protocol definitions. This test is a modified copy of the test that accompanied the original change to interfaces, in 2ba1979. Reviewers: bruno Reviewed By: bruno Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34788 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306732 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Modules/Inputs/lookup-assert-protocol/Base.h b/test/Modules/Inputs/lookup-assert-protocol/Base.h new file mode 100644 index 0000000000..5c9506fa5c --- /dev/null +++ b/test/Modules/Inputs/lookup-assert-protocol/Base.h @@ -0,0 +1,3 @@ +@protocol BaseProtocol +- (void) test; +@end diff --git a/test/Modules/Inputs/lookup-assert-protocol/Derive.h b/test/Modules/Inputs/lookup-assert-protocol/Derive.h new file mode 100644 index 0000000000..fdcde6158a --- /dev/null +++ b/test/Modules/Inputs/lookup-assert-protocol/Derive.h @@ -0,0 +1,4 @@ +#include "Base.h" +@protocol DerivedProtocol +- (void) test2; +@end diff --git a/test/Modules/Inputs/lookup-assert-protocol/H3.h b/test/Modules/Inputs/lookup-assert-protocol/H3.h new file mode 100644 index 0000000000..3d8f878905 --- /dev/null +++ b/test/Modules/Inputs/lookup-assert-protocol/H3.h @@ -0,0 +1 @@ +#include "Base.h" diff --git a/test/Modules/Inputs/lookup-assert-protocol/module.map b/test/Modules/Inputs/lookup-assert-protocol/module.map new file mode 100644 index 0000000000..e8a89eb095 --- /dev/null +++ b/test/Modules/Inputs/lookup-assert-protocol/module.map @@ -0,0 +1,4 @@ +module X { + header "H3.h" + export * +} diff --git a/test/Modules/lookup-assert-protocol.m b/test/Modules/lookup-assert-protocol.m new file mode 100644 index 0000000000..3c093f1bf1 --- /dev/null +++ b/test/Modules/lookup-assert-protocol.m @@ -0,0 +1,17 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/lookup-assert-protocol %s -verify +// expected-no-diagnostics + +#include "Derive.h" +#import + +__attribute__((objc_root_class)) +@interface Thing +@end + +@implementation Thing +- (void)test { +} +- (void)test2 { +} +@end