Skip to content

Commit b2f9bde

Browse files
author
Daniil Dudkin
committed
[flang][NFC] Allow whitespaces before ERROR
This change allows to write whitespaces before the `ERROR` keyword in semantic tests for consistency with other testing infrastructure. Also, one test is changed in order to test if the change works correctly. Reviewed By: Meinersbur Differential Revision: https://reviews.llvm.org/D125884
1 parent 06cf0ce commit b2f9bde

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

flang/test/Semantics/altreturn04.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
! Functions cannot use alt return
33

44
REAL FUNCTION altreturn01(X)
5-
!ERROR: RETURN with expression is only allowed in SUBROUTINE subprogram
5+
! ERROR: RETURN with expression is only allowed in SUBROUTINE subprogram
66
RETURN 1
77
END

flang/test/Semantics/test_errors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
# Gets the expected errors and their line number
5050
errors = []
5151
for i, line in enumerate(src, 1):
52-
m = re.search(r"(?:^\s*!ERROR: )(.*)", line)
52+
m = re.search(r"(?:^\s*!\s*ERROR: )(.*)", line)
5353
if m:
5454
errors.append(m.group(1))
5555
continue

0 commit comments

Comments
 (0)