xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/cycles.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: rm -rf %t
2*f4a2713aSLionel Sambuc // RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -F %S/Inputs %s 2>&1 | FileCheck %s
3*f4a2713aSLionel Sambuc // FIXME: When we have a syntax for modules in C, use that.
4*f4a2713aSLionel Sambuc @import MutuallyRecursive1;
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc // CHECK: While building module 'MutuallyRecursive1' imported from
7*f4a2713aSLionel Sambuc // CHECK: While building module 'MutuallyRecursive2' imported from
8*f4a2713aSLionel Sambuc // CHECK: MutuallyRecursive2.h:3:9: fatal error: cyclic dependency in module 'MutuallyRecursive1': MutuallyRecursive1 -> MutuallyRecursive2 -> MutuallyRecursive1
9*f4a2713aSLionel Sambuc // CHECK: MutuallyRecursive1.h:2:9: fatal error: could not build module 'MutuallyRecursive2'
10*f4a2713aSLionel Sambuc // CHECK: cycles.c:4:9: fatal error: could not build module 'MutuallyRecursive1'
11*f4a2713aSLionel Sambuc // CHECK: 3 errors generated
12*f4a2713aSLionel Sambuc 
13*f4a2713aSLionel Sambuc 
14