blob: 8ab1cbc261a2a6a4d2bb8fbfc197325d47607342 [file] [log] [blame]
Douglas Gregor830ea5b2012-11-30 18:38:50 +00001// RUN: rm -rf %t
2// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
3
4@__experimental_modules_import DependsOnModule;
5
6// CHECK: While building module 'DependsOnModule' imported from
7// CHECK: While building module 'Module' imported from
8// CHECK: error: expected ';' after top level declarator
9// CHECK: note: expanded from macro 'getModuleVersion'
10// CHECK: fatal error: could not build module 'Module'
11// CHECK: fatal error: could not build module 'DependsOnModule'
12// CHECK-NOT: error:
Douglas Gregor6c325432012-11-30 21:58:49 +000013
14// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s
15extern int Module;
16
17// CHECK-REDEF: In module 'DependsOnModule' imported from
18// CHECK-REDEF: In module 'Module' imported from
19// CHECK-REDEF: Module.h:15:12: note: previous definition is here
Douglas Gregor14afab32012-11-30 23:32:31 +000020
21// RUN: %clang_cc1 -fmodule-cache-path %t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t.diag %s 2>&1 || true
22// RUN: c-index-test -read-diagnostics %t.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s
23
24// CHECK-SDIAG: Inputs/Module.framework/Headers/Module.h:9:13: error: expected ';' after top level declarator
25// CHECK-SDIAG: build-fail-notes.m:4:32: note: while building module 'DependsOnModule' imported from
26// CHECK-SDIAG: Inputs/DependsOnModule.framework/Headers/DependsOnModule.h:1:10: note: while building module 'Module' imported from
27// CHECK-SDIAG: note: expanded from macro 'getModuleVersion'
28// CHECK-SDIAG: warning: umbrella header does not include header 'NotInModule.h' [-Wincomplete-umbrella]
29// CHECK-SDIAG: Inputs/DependsOnModule.framework/Headers/DependsOnModule.h:1:10: fatal: could not build module 'Module'
30// CHECK-SDIAG: build-fail-notes.m:4:32: note: while building module 'DependsOnModule' imported from
31