You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ClangImporter] set zero-byte originalSourceRange for AttributeFromClang
This won't affect diagnostic printing, as the diagnostic engine checks
the GeneratedSourceInfoKind and stops expanding if it's an
AttributeFromClang kind. This helps the diagnostic verifier expand to
the original location in source code however.
Copy file name to clipboardExpand all lines: test/Frontend/DiagnosticVerifier/clang-attribute.swift
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,52 +26,62 @@ module TestClang {
26
26
// CHECK: TEST_H:1:25: note: file 'TEST_H' is not parsed for 'expected' statements. Use '-verify-additional-file TEST_H' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
27
27
// CHECK: error: unexpected note produced: in expansion of macro '_SwiftifyImport' on global function 'foo' here
// CHECK: note: file '' is not parsed for 'expected' statements. Use '-verify-additional-file ' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
29
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
30
+
// CHECK: TMP_DIR/test.h:1:6: note: file 'TMP_DIR/test.h' is not parsed for 'expected' statements. Use '-verify-additional-file TMP_DIR/test.h' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
// CHECK: TEST_H:1:25: note: in expansion from here
33
34
// CHECK: TEST_H:1:25: note: file 'TEST_H' is not parsed for 'expected' statements. Use '-verify-additional-file TEST_H' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
34
35
// CHECK: error: unexpected note produced: in expansion of macro '_SwiftifyImport' on global function 'foo' here
// CHECK: note: file '' is not parsed for 'expected' statements. Use '-verify-additional-file ' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
37
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
38
+
// CHECK: TMP_DIR/test.h:1:6: note: file 'TMP_DIR/test.h' is not parsed for 'expected' statements. Use '-verify-additional-file TMP_DIR/test.h' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
37
39
38
40
// CHECK: @__swiftmacro_So3foo15_SwiftifyImportfMp_.swift:3:1: error: unexpected remark produced: macro content: | let len = Int32(exactly: p.count)!|
39
41
// CHECK: TEST_H:1:25: note: in expansion from here
40
42
// CHECK: TEST_H:1:25: note: file 'TEST_H' is not parsed for 'expected' statements. Use '-verify-additional-file TEST_H' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
41
43
// CHECK: error: unexpected note produced: in expansion of macro '_SwiftifyImport' on global function 'foo' here
// CHECK: note: file '' is not parsed for 'expected' statements. Use '-verify-additional-file ' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
45
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
46
+
// CHECK: TMP_DIR/test.h:1:6: note: file 'TMP_DIR/test.h' is not parsed for 'expected' statements. Use '-verify-additional-file TMP_DIR/test.h' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
// CHECK: TEST_H:1:25: note: in expansion from here
47
50
// CHECK: TEST_H:1:25: note: file 'TEST_H' is not parsed for 'expected' statements. Use '-verify-additional-file TEST_H' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
48
51
// CHECK: error: unexpected note produced: in expansion of macro '_SwiftifyImport' on global function 'foo' here
// CHECK: note: file '' is not parsed for 'expected' statements. Use '-verify-additional-file ' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
53
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
54
+
// CHECK: TMP_DIR/test.h:1:6: note: file 'TMP_DIR/test.h' is not parsed for 'expected' statements. Use '-verify-additional-file TMP_DIR/test.h' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
// CHECK: TEST_H:1:25: note: in expansion from here
54
58
// CHECK: TEST_H:1:25: note: file 'TEST_H' is not parsed for 'expected' statements. Use '-verify-additional-file TEST_H' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
55
59
// CHECK: error: unexpected note produced: in expansion of macro '_SwiftifyImport' on global function 'foo' here
// CHECK: note: file '' is not parsed for 'expected' statements. Use '-verify-additional-file ' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
61
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
62
+
// CHECK: TMP_DIR/test.h:1:6: note: file 'TMP_DIR/test.h' is not parsed for 'expected' statements. Use '-verify-additional-file TMP_DIR/test.h' to enable, or '-verify-ignore-unrelated' to ignore diagnostics in this file
58
63
59
64
// CHECK: @__swiftmacro_So3foo15_SwiftifyImportfMp_.swift:1:1: remark: diagnostic produced elsewhere: macro content: |/// This is an auto-generated wrapper for safer interop|
60
65
// CHECK: TEST_H:1:25: note: in expansion from here
61
66
// CHECK: note: diagnostic produced elsewhere: in expansion of macro '_SwiftifyImport' on global function 'foo' here
67
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
62
68
63
69
// CHECK: @__swiftmacro_So3foo15_SwiftifyImportfMp_.swift:2:1: remark: diagnostic produced elsewhere: macro content: |@_alwaysEmitIntoClient @_disfavoredOverload public func foo(_ p: UnsafeMutableBufferPointer<Int32>) {|
64
70
// CHECK: TEST_H:1:25: note: in expansion from here
65
71
// CHECK: note: diagnostic produced elsewhere: in expansion of macro '_SwiftifyImport' on global function 'foo' here
72
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
66
73
67
74
// CHECK: @__swiftmacro_So3foo15_SwiftifyImportfMp_.swift:3:1: remark: diagnostic produced elsewhere: macro content: | let len = Int32(exactly: p.count)!|
68
75
// CHECK: TEST_H:1:25: note: in expansion from here
69
76
// CHECK: note: diagnostic produced elsewhere: in expansion of macro '_SwiftifyImport' on global function 'foo' here
77
+
// CHECK: TMP_DIR/test.h:1:6: note: in expansion from here
0 commit comments