Skip to content

Commit 5422c8d

Browse files
committed
Fix bug where column is specified for own line
When the syntax `expected-error@:42{{}}` was used, this would accidentally trigger "absolute line" mode, despite not specifying a line, resulting in the target line always being line 0.
1 parent b2069a3 commit 5422c8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Frontend/DiagnosticVerifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ unsigned DiagnosticVerifier::parseExpectedDiagInfo(
700700
Offs = MatchStart.slice(2, TextStartIdx).rtrim();
701701
else {
702702
Offs = MatchStart.slice(1, TextStartIdx).rtrim();
703-
if (Offs[0] != '-')
703+
if (Offs[0] >= '0' && Offs[0] <= '9')
704704
AbsoluteLine = true;
705705
}
706706

0 commit comments

Comments
 (0)