xref: /minix3/external/bsd/llvm/dist/clang/test/Modules/build-fail-notes.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: rm -rf %t
2*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@import DependsOnModule;
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc// CHECK: While building module 'DependsOnModule' imported from
7*f4a2713aSLionel Sambuc// CHECK: While building module 'Module' imported from
8*f4a2713aSLionel Sambuc// CHECK: error: expected ';' after top level declarator
9*f4a2713aSLionel Sambuc// CHECK: note: expanded from here
10*f4a2713aSLionel Sambuc// CHECK: fatal error: could not build module 'Module'
11*f4a2713aSLionel Sambuc// CHECK: fatal error: could not build module 'DependsOnModule'
12*f4a2713aSLionel Sambuc// CHECK-NOT: error:
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s
15*f4a2713aSLionel Sambucextern int Module;
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambuc// CHECK-REDEF: In module 'DependsOnModule' imported from
18*f4a2713aSLionel Sambuc// CHECK-REDEF: In module 'Module' imported from
19*f4a2713aSLionel Sambuc// CHECK-REDEF: Module.h:15:12: note: previous definition is here
20*f4a2713aSLionel Sambuc
21*f4a2713aSLionel Sambuc// RUN: not %clang_cc1 -Wincomplete-umbrella -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&1
22*f4a2713aSLionel Sambuc// RUN: c-index-test -read-diagnostics %t/tmp.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc// CHECK-SDIAG: Module.h:9:13: error: expected ';' after top level declarator
25*f4a2713aSLionel Sambuc// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from
26*f4a2713aSLionel Sambuc// CHECK-SDIAG: DependsOnModule.h:1:10: note: while building module 'Module' imported from
27*f4a2713aSLionel Sambuc// CHECK-SDIAG: note: expanded from here
28*f4a2713aSLionel Sambuc// CHECK-SDIAG: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella]
29*f4a2713aSLionel Sambuc// CHECK-SDIAG: DependsOnModule.h:1:10: fatal: could not build module 'Module'
30*f4a2713aSLionel Sambuc// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from
31*f4a2713aSLionel Sambuc
32