The assert assumed that the escaped character could not appear at the end of the string.
Fixes tensorflow/mlir#117
PiperOrigin-RevId:
266975471
continue;
}
- assert(i + 1 < e && "invalid string should be caught by lexer");
+ assert(i + 1 <= e && "invalid string should be caught by lexer");
auto c1 = bytes[i++];
switch (c1) {
case '"':
// CHECK-LABEL: func @ptr_to_function() -> !unreg.ptr<() -> ()>
func @ptr_to_function() -> !unreg.ptr<() -> ()>
+
+// CHECK-LABEL: func @escaped_string_char(i1 {foo.value = "\0A"})
+func @escaped_string_char(i1 {foo.value = "\n"})