Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame^] | 2 | // RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s |
Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 3 | |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 4 | @import DependsOnModule; |
Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 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 |
Richard Smith | ca95228 | 2012-12-05 22:18:04 +0000 | [diff] [blame] | 9 | // CHECK: note: expanded from here |
Douglas Gregor | 830ea5b | 2012-11-30 18:38:50 +0000 | [diff] [blame] | 10 | // CHECK: fatal error: could not build module 'Module' |
| 11 | // CHECK: fatal error: could not build module 'DependsOnModule' |
| 12 | // CHECK-NOT: error: |
Douglas Gregor | 6c32543 | 2012-11-30 21:58:49 +0000 | [diff] [blame] | 13 | |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame^] | 14 | // RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs %s -fdiagnostics-show-note-include-stack 2>&1 | FileCheck -check-prefix=CHECK-REDEF %s |
Douglas Gregor | 6c32543 | 2012-11-30 21:58:49 +0000 | [diff] [blame] | 15 | extern 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 Gregor | 14afab3 | 2012-11-30 23:32:31 +0000 | [diff] [blame] | 20 | |
Douglas Gregor | 953a61f | 2013-02-07 19:01:24 +0000 | [diff] [blame^] | 21 | // RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&1 |
Richard Smith | ca95228 | 2012-12-05 22:18:04 +0000 | [diff] [blame] | 22 | // RUN: c-index-test -read-diagnostics %t/tmp.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s |
Douglas Gregor | 14afab3 | 2012-11-30 23:32:31 +0000 | [diff] [blame] | 23 | |
Douglas Gregor | 5a98f1d | 2012-11-30 23:40:49 +0000 | [diff] [blame] | 24 | // CHECK-SDIAG: Module.h:9:13: error: expected ';' after top level declarator |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 25 | // CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from |
Douglas Gregor | 5a98f1d | 2012-11-30 23:40:49 +0000 | [diff] [blame] | 26 | // CHECK-SDIAG: DependsOnModule.h:1:10: note: while building module 'Module' imported from |
Richard Smith | ca95228 | 2012-12-05 22:18:04 +0000 | [diff] [blame] | 27 | // CHECK-SDIAG: note: expanded from here |
Douglas Gregor | c9c3907 | 2013-01-04 18:58:28 +0000 | [diff] [blame] | 28 | // CHECK-SDIAG: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella] |
Douglas Gregor | 5a98f1d | 2012-11-30 23:40:49 +0000 | [diff] [blame] | 29 | // CHECK-SDIAG: DependsOnModule.h:1:10: fatal: could not build module 'Module' |
Douglas Gregor | 1b257af | 2012-12-11 22:11:52 +0000 | [diff] [blame] | 30 | // CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from |
Douglas Gregor | 14afab3 | 2012-11-30 23:32:31 +0000 | [diff] [blame] | 31 | |