diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/Modules/build-fail-notes.m | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/Modules/build-fail-notes.m')
-rw-r--r-- | test/Modules/build-fail-notes.m | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/Modules/build-fail-notes.m b/test/Modules/build-fail-notes.m new file mode 100644 index 0000000..8375788 --- /dev/null +++ b/test/Modules/build-fail-notes.m @@ -0,0 +1,31 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" %s 2>&1 | FileCheck %s + +@import DependsOnModule; + +// CHECK: While building module 'DependsOnModule' imported from +// CHECK: While building module 'Module' imported from +// CHECK: error: expected ';' after top level declarator +// CHECK: note: expanded from here +// CHECK: fatal error: could not build module 'Module' +// CHECK: fatal error: could not build module 'DependsOnModule' +// CHECK-NOT: error: + +// 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 +extern int Module; + +// CHECK-REDEF: In module 'DependsOnModule' imported from +// CHECK-REDEF: In module 'Module' imported from +// CHECK-REDEF: Module.h:15:12: note: previous definition is here + +// RUN: not %clang_cc1 -fmodules-cache-path=%t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t/tmp.diag %s 2>&1 +// RUN: c-index-test -read-diagnostics %t/tmp.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s + +// CHECK-SDIAG: Module.h:9:13: error: expected ';' after top level declarator +// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from +// CHECK-SDIAG: DependsOnModule.h:1:10: note: while building module 'Module' imported from +// CHECK-SDIAG: note: expanded from here +// CHECK-SDIAG: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella] +// CHECK-SDIAG: DependsOnModule.h:1:10: fatal: could not build module 'Module' +// CHECK-SDIAG: build-fail-notes.m:4:9: note: while building module 'DependsOnModule' imported from + |