Replace int lines with file-associated SourceLocations (#779)

Most interesting changes should be ast/source_location.h and syntax/parse_and_lex_context.h
This commit is contained in:
Jon Meow
2021-08-26 10:07:16 -07:00
committed by GitHub
parent 33daf64329
commit 3ec550a85f
46 changed files with 607 additions and 518 deletions
@@ -1,2 +1,2 @@
COMPILATION ERROR: 11: class Point does not have a field named z
COMPILATION ERROR: executable_semantics/testdata/class_field_access_mismatch.carbon:11: class Point does not have a field named z
EXIT CODE: 255
+1 -1
View File
@@ -1,4 +1,4 @@
COMPILATION ERROR: 11: type error in call
COMPILATION ERROR: executable_semantics/testdata/class_field_mismatch.carbon:11: type error in call
expected: (x = i32, y = i32)
actual: (x = i32, z = i32)
EXIT CODE: 255
+1 -1
View File
@@ -1,4 +1,4 @@
COMPILATION ERROR: 11: type error in call
COMPILATION ERROR: executable_semantics/testdata/class_field_missing.carbon:11: type error in call
expected: (x = i32, y = i32)
actual: (x = i32)
EXIT CODE: 255
@@ -1,2 +1,2 @@
RUNTIME ERROR: 12: undefined behavior: access to dead value 1
RUNTIME ERROR: executable_semantics/testdata/experimental_continuation9.carbon:12: undefined behavior: access to dead value 1
EXIT CODE: 255
+1 -1
View File
@@ -1,4 +1,4 @@
COMPILATION ERROR: 10: type error in call
COMPILATION ERROR: executable_semantics/testdata/fun6_fail_type.carbon:10: type error in call
expected: (0 = i32, 1 = i32)
actual: (0 = (0 = i32, 1 = i32))
EXIT CODE: 255
+1 -1
View File
@@ -1,2 +1,2 @@
PROGRAM ERROR: 5: positional members must come before named members
PROGRAM ERROR: executable_semantics/testdata/fun_named_params2.carbon:5: positional members must come before named members
EXIT CODE: 255
@@ -1,4 +1,4 @@
COMPILATION ERROR: 10: type error in argument deduction
COMPILATION ERROR: executable_semantics/testdata/generic_function_fail1.carbon:10: type error in argument deduction
expected: i32
actual: Bool
EXIT CODE: 255
@@ -1,2 +1,2 @@
COMPILATION ERROR: 10: could not deduce type argument for type parameter T
COMPILATION ERROR: executable_semantics/testdata/generic_function_fail2.carbon:10: could not deduce type argument for type parameter T
EXIT CODE: 255
@@ -1,4 +1,4 @@
COMPILATION ERROR: 6: type error in addition(1)
COMPILATION ERROR: executable_semantics/testdata/generic_function_fail3.carbon:6: type error in addition(1)
expected: i32
actual: T
EXIT CODE: 255
+1 -1
View File
@@ -1,4 +1,4 @@
COMPILATION ERROR: 7: type error in initializer of variable
COMPILATION ERROR: executable_semantics/testdata/global_variable3.carbon:7: type error in initializer of variable
expected: i32
actual: Bool
EXIT CODE: 255
+1 -1
View File
@@ -1,4 +1,4 @@
COMPILATION ERROR: 10: type error in return
COMPILATION ERROR: executable_semantics/testdata/global_variable5.carbon:10: type error in return
expected: ()
actual: i32
EXIT CODE: 255
+1 -1
View File
@@ -1,2 +1,2 @@
RUNTIME ERROR: 8: could not find `y`
RUNTIME ERROR: executable_semantics/testdata/global_variable8.carbon:8: could not find `y`
EXIT CODE: 255
+1 -1
View File
@@ -1,2 +1,2 @@
COMPILATION ERROR: 7: syntax error, unexpected :
COMPILATION ERROR: executable_semantics/testdata/pattern_variable_fail.carbon:7: syntax error, unexpected :
EXIT CODE: 255
+1 -1
View File
@@ -1,2 +1,2 @@
COMPILATION ERROR: 5: syntax error, unexpected AUTO
COMPILATION ERROR: executable_semantics/testdata/return_auto.carbon:5: syntax error, unexpected AUTO
EXIT CODE: 255
@@ -1,2 +1,2 @@
COMPILATION ERROR: 6: return (); should not provide a return value, to match the function's signature.
COMPILATION ERROR: executable_semantics/testdata/return_empty_explicit_fail.carbon:6: return (); should not provide a return value, to match the function's signature.
EXIT CODE: 255
@@ -1,2 +1,2 @@
COMPILATION ERROR: 6: control-flow reaches end of function that provides a `->` return type without reaching a return statement
COMPILATION ERROR: executable_semantics/testdata/return_empty_implicit_fail1.carbon:6: control-flow reaches end of function that provides a `->` return type without reaching a return statement
EXIT CODE: 255
@@ -1,2 +1,2 @@
COMPILATION ERROR: 6: return; should provide a return value, to match the function's signature.
COMPILATION ERROR: executable_semantics/testdata/return_empty_implicit_fail2.carbon:6: return; should provide a return value, to match the function's signature.
EXIT CODE: 255
+1 -1
View File
@@ -1,2 +1,2 @@
PROGRAM ERROR: 6: positional members must come before named members
PROGRAM ERROR: executable_semantics/testdata/tuple4.carbon:6: positional members must come before named members
EXIT CODE: 255
+1 -1
View File
@@ -1,2 +1,2 @@
PROGRAM ERROR: 8: Tuple field name 'y' does not match pattern field name 'x'
PROGRAM ERROR: executable_semantics/testdata/tuple5.carbon:8: Tuple field name 'y' does not match pattern field name 'x'
EXIT CODE: 255
+1 -1
View File
@@ -1,4 +1,4 @@
COMPILATION ERROR: 8: type error in ==
COMPILATION ERROR: executable_semantics/testdata/tuple_equality3.carbon:8: type error in ==
expected: (0 = i32, 1 = i32)
actual: (0 = i32)
EXIT CODE: 255