summaryrefslogtreecommitdiff
path: root/test/Modules/build-fail-notes.m
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-11-30 21:58:49 +0000
committerDouglas Gregor <dgregor@apple.com>2012-11-30 21:58:49 +0000
commit6c3254316de2d0d554b19702f4b10117ae46b77b (patch)
tree41958990afe0593fe4a41235e59999f0ffb2f08d /test/Modules/build-fail-notes.m
parentbbe89d5670b458fc1e2fff49e96e119ffb1622c8 (diff)
downloadclang-6c3254316de2d0d554b19702f4b10117ae46b77b.tar.gz
When we're emitting a diagnostic with a source location in an imported
module, provide a module import stack similar to what we would get for an include stack, e.g., In module 'DependsOnModule' imported from build-fail-notes.m:4: In module 'Module' imported from DependsOnModule.framework/Headers/DependsOnModule.h:1: Inputs/Module.framework/Headers/Module.h:15:12: note: previous definition is here @interface Module <rdar://problem/12696425> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169042 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules/build-fail-notes.m')
-rw-r--r--test/Modules/build-fail-notes.m7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/Modules/build-fail-notes.m b/test/Modules/build-fail-notes.m
index fe5522342f..4c5d5f5de5 100644
--- a/test/Modules/build-fail-notes.m
+++ b/test/Modules/build-fail-notes.m
@@ -10,3 +10,10 @@
// CHECK: fatal error: could not build module 'Module'
// CHECK: fatal error: could not build module 'DependsOnModule'
// CHECK-NOT: error:
+
+// RUN: %clang_cc1 -fmodule-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