blob: 47728d814c29ac3036b80381e94a7df9f1b97231 [file] [log] [blame]
Douglas Gregor1f87cf42011-09-15 20:54:06 +00001// RUN: rm -rf %t
Rafael Espindola96e78132013-07-04 16:16:58 +00002// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s
Douglas Gregorc13a34b2012-01-03 19:32:59 +00003// FIXME: When we have a syntax for modules in C, use that.
Douglas Gregor1b257af2012-12-11 22:11:52 +00004@import MutuallyRecursive1;
Douglas Gregor1f87cf42011-09-15 20:54:06 +00005
Douglas Gregor830ea5b2012-11-30 18:38:50 +00006// CHECK: While building module 'MutuallyRecursive1' imported from
7// CHECK: While building module 'MutuallyRecursive2' imported from
Douglas Gregor1b257af2012-12-11 22:11:52 +00008// CHECK: MutuallyRecursive2.h:3:9: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1
Douglas Gregor1b257af2012-12-11 22:11:52 +00009// CHECK: MutuallyRecursive1.h:2:9: fatal error: could not build module 'MutuallyRecursive2'
10// CHECK: cycles.c:4:9: fatal error: could not build module 'MutuallyRecursive1'
Douglas Gregora4a90ca2013-05-03 22:58:43 +000011// CHECK: 3 errors generated
12
Douglas Gregor1f87cf42011-09-15 20:54:06 +000013