diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-03-05 20:51:45 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-03-05 20:51:45 +0000 |
commit | 8c71eba19f267c5ea6561d9d92fbc963cfc88a9c (patch) | |
tree | ab156303eee040068df828d9df4a1791673278f3 /clang/test/Modules/recursive.c | |
parent | b63570ecb63e0a835ecc99ada27cfabf492e4e3d (diff) | |
download | bcm5719-llvm-8c71eba19f267c5ea6561d9d92fbc963cfc88a9c.tar.gz bcm5719-llvm-8c71eba19f267c5ea6561d9d92fbc963cfc88a9c.zip |
If a #include finds a file relative to the current file, don't forget to check
whether it's part of a module.
llvm-svn: 203005
Diffstat (limited to 'clang/test/Modules/recursive.c')
-rw-r--r-- | clang/test/Modules/recursive.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/Modules/recursive.c b/clang/test/Modules/recursive.c new file mode 100644 index 00000000000..668ba38dffa --- /dev/null +++ b/clang/test/Modules/recursive.c @@ -0,0 +1,11 @@ +// RUN: rm -rf %t +// RUN: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s 2>&1 | FileCheck %s +#include "recursive1.h" + +// FIXME: rm -rf %t +// FIXME: not %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -emit-module -fmodule-name=recursive1 %S/Inputs/module.map 2>&1 | FileCheck %s + +// CHECK: While building module 'recursive1'{{( imported from .*/recursive.c:3)?}}: +// CHECK-NEXT: While building module 'recursive2' imported from {{.*}}Inputs/recursive1.h:1: +// CHECK-NEXT: In file included from <module-includes>:1: +// CHECK-NEXT: recursive2.h:1:10: fatal error: cyclic dependency in module 'recursive1': recursive1 -> recursive2 -> recursive1 |