summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules/build-fail-notes.m
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-11-30 23:32:31 +0000
committerDouglas Gregor <dgregor@apple.com>2012-11-30 23:32:31 +0000
commitfa686fb4ed3bb9c7a310f65ebeff8637ec5b90b6 (patch)
treee76fa4123c4d31119eeff4fb973f598b29f8d700 /clang/test/Modules/build-fail-notes.m
parentc7e43fffc5ae0d3559e412061ba8102fe43dfd21 (diff)
downloadbcm5719-llvm-fa686fb4ed3bb9c7a310f65ebeff8637ec5b90b6.tar.gz
bcm5719-llvm-fa686fb4ed3bb9c7a310f65ebeff8637ec5b90b6.zip
Teach the serialized diagnostic writer to clone() itself, sharing
state so that all of the various clones end up rendering their diagnostics into the same serialized-diagnostics file. This is important when we actually want failures during module build to be reported back to the translation unit that tried to import the not-yet-built or out-of-date module. <rdar://problem/12565727> llvm-svn: 169057
Diffstat (limited to 'clang/test/Modules/build-fail-notes.m')
-rw-r--r--clang/test/Modules/build-fail-notes.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/test/Modules/build-fail-notes.m b/clang/test/Modules/build-fail-notes.m
index 4c5d5f5de52..8ab1cbc261a 100644
--- a/clang/test/Modules/build-fail-notes.m
+++ b/clang/test/Modules/build-fail-notes.m
@@ -17,3 +17,15 @@ 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: %clang_cc1 -fmodule-cache-path %t -fmodules -F %S/Inputs -DgetModuleVersion="epic fail" -serialize-diagnostic-file %t.diag %s 2>&1 || true
+// RUN: c-index-test -read-diagnostics %t.diag 2>&1 | FileCheck -check-prefix=CHECK-SDIAG %s
+
+// CHECK-SDIAG: Inputs/Module.framework/Headers/Module.h:9:13: error: expected ';' after top level declarator
+// CHECK-SDIAG: build-fail-notes.m:4:32: note: while building module 'DependsOnModule' imported from
+// CHECK-SDIAG: Inputs/DependsOnModule.framework/Headers/DependsOnModule.h:1:10: note: while building module 'Module' imported from
+// CHECK-SDIAG: note: expanded from macro 'getModuleVersion'
+// CHECK-SDIAG: warning: umbrella header does not include header 'NotInModule.h' [-Wincomplete-umbrella]
+// CHECK-SDIAG: Inputs/DependsOnModule.framework/Headers/DependsOnModule.h:1:10: fatal: could not build module 'Module'
+// CHECK-SDIAG: build-fail-notes.m:4:32: note: while building module 'DependsOnModule' imported from
+
OpenPOWER on IntegriCloud