2 // RUN: split-file %s %t
3 // RUN: %clang_cc1 -Wobjc-multiple-method-names -fsyntax-only -fmodules-cache-path=%t/modules.cache -fmodules -fimplicit-module-maps -F %t/Frameworks %t/test.m -verify
5 // Verify we are handling methods from transitive modules, not just from immediate ones.
7 //--- Frameworks/Indirect.framework/Headers/Indirect.h
11 @interface Indirect : NSObject
15 //--- Frameworks/Indirect.framework/Modules/module.modulemap
16 framework module Indirect {
21 //--- Frameworks/Immediate.framework/Headers/Immediate.h
22 #import <Indirect/Indirect.h>
23 @interface Immediate : NSObject
27 //--- Frameworks/Immediate.framework/Modules/module.modulemap
28 framework module Immediate {
34 #import <Immediate/Immediate.h>
37 [obj method]; // expected-warning{{multiple methods named 'method' found}}
38 // expected-note@Frameworks/Indirect.framework/Headers/Indirect.h:5{{using}}
39 // expected-note@Frameworks/Immediate.framework/Headers/Immediate.h:3{{also found}}