Douglas Gregor | f31caee | 2011-09-15 20:54:06 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Richard Smith | 47972af | 2015-06-16 00:08:24 +0000 | [diff] [blame] | 2 | // RUN: not %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s |
Douglas Gregor | da82e70 | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 3 | // FIXME: When we have a syntax for modules in C, use that. |
Douglas Gregor | c50d492 | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 4 | @import MutuallyRecursive1; |
Douglas Gregor | f31caee | 2011-09-15 20:54:06 +0000 | [diff] [blame] | 5 | |
Douglas Gregor | af8f026 | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 6 | // CHECK: While building module 'MutuallyRecursive1' imported from |
| 7 | // CHECK: While building module 'MutuallyRecursive2' imported from |
Douglas Gregor | c50d492 | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 8 | // CHECK: MutuallyRecursive2.h:3:9: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1 |
Douglas Gregor | c50d492 | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 9 | // 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 Gregor | 6b93096 | 2013-05-03 22:58:43 +0000 | [diff] [blame] | 11 | // CHECK: 3 errors generated |
| 12 | |
Douglas Gregor | f31caee | 2011-09-15 20:54:06 +0000 | [diff] [blame] | 13 | |