blob: 47bdbc7fca6cbceed922bde552c9540d44d94e15 [file] [log] [blame]
Douglas Gregoraf8f0262012-11-30 18:38:50 +00001// RUN: rm -rf %t
Richard Smith47972af2015-06-16 00:08:24 +00002// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s
Douglas Gregoraf8f0262012-11-30 18:38:50 +00003
Douglas Gregorc50d4922012-12-11 22:11:52 +00004@import DependsOnModule;
Douglas Gregoraf8f0262012-11-30 18:38:50 +00005
6// CHECK: While building module 'DependsOnModule' imported from
7// CHECK: While building module 'Module' imported from
8// CHECK: error: expected ';' after top level declarator
Richard Smithc524ec42012-12-05 22:18:04 +00009// CHECK: note: expanded from here
Douglas Gregoraf8f0262012-11-30 18:38:50 +000010// CHECK: fatal error: could not build module 'Module'
11// CHECK: fatal error: could not build module 'DependsOnModule'
12// CHECK-NOT: error:
Douglas Gregor22103e32012-11-30 21:58:49 +000013
Richard Smith47972af2015-06-16 00:08:24 +000014// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s
Douglas Gregor22103e32012-11-30 21:58:49 +000015extern 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 Gregorfa686fb2012-11-30 23:32:31 +000020
Richard Smith47972af2015-06-16 00:08:24 +000021// RUN: not %clang_cc1 -Wincomplete-umbrella -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&1
Richard Smithc524ec42012-12-05 22:18:04 +000022// RUN: c-index-test -read-diagnostics %t/tmp.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s
Douglas Gregorfa686fb2012-11-30 23:32:31 +000023
Douglas Gregor47238dc2012-11-30 23:40:49 +000024// CHECK-SDIAG: Module.h:9:13: error: expected ';' after top level declarator
Douglas Gregorc50d4922012-12-11 22:11:52 +000025// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from
Douglas Gregor47238dc2012-11-30 23:40:49 +000026// CHECK-SDIAG: DependsOnModule.h:1:10: note: while building module 'Module' imported from
Richard Smithc524ec42012-12-05 22:18:04 +000027// CHECK-SDIAG: note: expanded from here
Douglas Gregor8f1f3332013-01-04 18:58:28 +000028// CHECK-SDIAG: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella]
Douglas Gregor47238dc2012-11-30 23:40:49 +000029// CHECK-SDIAG: DependsOnModule.h:1:10: fatal: could not build module 'Module'
Douglas Gregorc50d4922012-12-11 22:11:52 +000030// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from
Douglas Gregorfa686fb2012-11-30 23:32:31 +000031