|
1 |
| -// RUN: not %target-swift-frontend -typecheck %s -F %S/Inputs/frameworks -Xcc -D -Xcc FOO 2> %t.err.txt |
2 |
| -// RUN: %FileCheck -input-file=%t.err.txt %s |
| 1 | +// RUN: %empty-directory(%t) |
| 2 | +// RUN: not %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -serialize-diagnostics-path %t.dia -Xcc -D -Xcc FOO 2>&1 | %FileCheck %s |
| 3 | +// RUN: test -s %t.dia |
| 4 | +// RUN: c-index-test -read-diagnostics %t.dia 2>&1 | %FileCheck %s |
| 5 | + |
| 6 | +// RUN: %empty-directory(%t) |
| 7 | +// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -serialize-diagnostics-path %t.warn.dia 2>&1 | %FileCheck %s -check-prefix CHECK-WARN |
| 8 | +// RUN: test -s %t.warn.dia |
| 9 | +// RUN: c-index-test -read-diagnostics %t.warn.dia 2>&1 | %FileCheck %s -check-prefix CHECK-WARN |
| 10 | + |
| 11 | +// Also check batch mode (multiple primary files). |
| 12 | +// RUN: %empty-directory(%t) |
| 13 | +// RUN: not %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck -primary-file %s -primary-file %S/../Inputs/empty.swift -F %S/Inputs/frameworks -serialize-diagnostics-path %t.1.dia -serialize-diagnostics-path %t.2.dia -Xcc -D -Xcc FOO 2>&1 | %FileCheck %s |
| 14 | +// RUN: test -s %t.1.dia |
| 15 | +// RUN: c-index-test -read-diagnostics %t.1.dia 2>&1 | %FileCheck %s |
| 16 | +// RUN: c-index-test -read-diagnostics %t.1.dia 2>&1 | %FileCheck %s -check-prefix CHECK-PRIMARY |
| 17 | +// RUN: test -s %t.2.dia |
| 18 | +// RUN: c-index-test -read-diagnostics %t.2.dia 2>&1 | %FileCheck %s |
3 | 19 |
|
4 |
| -// RUN: %target-swift-frontend -typecheck %s -F %S/Inputs/frameworks 2> %t.warn.txt |
5 |
| -// RUN: %FileCheck -input-file=%t.warn.txt %s -check-prefix=CHECK-WARN |
| 20 | +// RUN: %empty-directory(%t) |
| 21 | +// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck -primary-file %s -primary-file %S/../Inputs/empty.swift -F %S/Inputs/frameworks -serialize-diagnostics-path %t.warn.1.dia -serialize-diagnostics-path %t.warn.2.dia 2>&1 | %FileCheck %s -check-prefix CHECK-WARN |
| 22 | +// RUN: test -s %t.1.dia |
| 23 | +// RUN: c-index-test -read-diagnostics %t.warn.1.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-WARN |
| 24 | +// RUN: test -s %t.2.dia |
| 25 | +// RUN: c-index-test -read-diagnostics %t.warn.2.dia 2>&1 | %FileCheck %s -check-prefix=CHECK-WARN |
6 | 26 |
|
7 |
| -// RUN: %target-swift-frontend -typecheck %s -F %S/Inputs/frameworks -Xcc -Wno-#warnings 2> %t.nowarn.txt |
8 |
| -// RUN: %FileCheck -input-file=%t.nowarn.txt %s -check-prefix=CHECK-NO-WARN -allow-empty |
| 27 | +// Verify that -Wno-* options are applied. |
| 28 | +// RUN: %empty-directory(%t) |
9 | 29 |
|
10 |
| -// XFAIL: linux |
| 30 | +// RUN: %target-swift-frontend -module-cache-path %t -enable-objc-interop -typecheck %s -F %S/Inputs/frameworks -Xcc -Wno-#warnings 2>&1 | %FileCheck -check-prefix CHECK-NO-WARN -allow-empty %s |
11 | 31 |
|
12 | 32 | import Module
|
13 | 33 |
|
14 | 34 | // CHECK: Another.h:2:4: error: Module should have been built without -DFOO
|
15 | 35 | // CHECK: Sub2.h:2:9: error: could not build module 'Another'
|
16 |
| -// CHECK: diags_from_module.swift:[[@LINE-4]]:8: error: could not build Objective-C module 'Module' |
| 36 | +// CHECK-PRIMARY: diags_from_module.swift:[[@LINE-4]]:8: error: could not build Objective-C module 'Module' |
17 | 37 |
|
18 | 38 | // CHECK-WARN: Sub2.h:7:2: warning: here is some warning about something
|
19 | 39 | // FIXME: show the clang warning: <module-includes>:1:1: warning: umbrella header for module 'Module' does not include header 'NotInModule.h' [-Wincomplete-umbrella]
|
|
0 commit comments