PrintDiag = !Diags;
}
- // If the current position is at the end of a line, advance to the start of
- // the next line.
- Buffer = Buffer.substr(Buffer.find_first_not_of(" \t\n\r"));
FileCheckDiag::MatchType MatchTy = ExpectedMatch
? FileCheckDiag::MatchNoneButExpected
: FileCheckDiag::MatchNoneAndExcluded;
; ALIGN:Input was:
; ALIGN-NEXT:<<<<<<
-; ALIGN-NEXT: 1: hello world
+; ALIGN-NEXT: 1: hello world
; ALIGN-NEXT:check:1 ^~~~~
-; ALIGN-NEXT:check:2'0 X~~~~ error: no match found
-; ALIGN-NEXT: 2: goodbye
-; ALIGN-NEXT:check:2'0 ~~~~~~~
-; ALIGN-NEXT: 3: world
-; ALIGN-NEXT:check:2'0 ~~~~~
-; ALIGN-NEXT: 4: unicorn
-; ALIGN-NEXT:check:2'0 ~~~~~~~
-; ALIGN-NEXT:check:2'1 ? possible intended match
+; ALIGN-NEXT:check:2'0 X~~~~~~ error: no match found
+; ALIGN-NEXT: 2: goodbye
+; ALIGN-NEXT:check:2'0 ~~~~~~~~
+; ALIGN-NEXT: 3: world
+; ALIGN-NEXT:check:2'0 ~~~~~~
+; ALIGN-NEXT: 4: unicorn
+; ALIGN-NEXT:check:2'0 ~~~~~~~~
+; ALIGN-NEXT:check:2'1 ? possible intended match
; ALIGN-NEXT:>>>>>>
; ALIGN-NOT:{{.}}
; CHK: {{.*}}possible intended match here{{.*}}
; CHK: <<<<<<
-; CHK-NEXT: 1: hello
+; CHK-NEXT: 1: hello
; CHK-V-NEXT: check:1 ^~~~~
-; CHK-NEXT: 2: again
-; CHK-NEXT: check:2'0 X~~~~ error: no match found
-; CHK-NEXT: 3: whirled
-; CHK-NEXT: check:2'0 ~~~~~~~
-; CHK-NEXT: check:2'1 ? possible intended match
+; CHK-NEXT: check:2'0 X error: no match found
+; CHK-NEXT: 2: again
+; CHK-NEXT: check:2'0 ~~~~~~
+; CHK-NEXT: 3: whirled
+; CHK-NEXT: check:2'0 ~~~~~~~~
+; CHK-NEXT: check:2'1 ? possible intended match
; CHK-NEXT: >>>>>>
; CHK-NOT: {{.}}
; CNT: {{.*}}error:{{.*}}
; CNT: <<<<<<
-; CNT-NEXT: 1: pete
+; CNT-NEXT: 1: pete
; CNT-V-NEXT: count:1'0 ^~~~
-; CNT-NEXT: 2: repete
+; CNT-NEXT: 2: repete
; CNT-V-NEXT: count:1'1 ^~~~
-; CNT-NEXT: 3: repeat
-; CNT-Q-NEXT: count:1 X~~~~~ error: no match found
-; CNT-V-NEXT: count:1'2 X~~~~~ error: no match found
+; CNT-Q-NEXT: count:1'0 X error: no match found
+; CNT-V-NEXT: count:1'2 X error: no match found
+; CNT-NEXT: 3: repeat
+; CNT-Q-NEXT: count:1'0 ~~~~~~~
+; CNT-Q-NEXT: count:1'1 ? possible intended match
+; CNT-V-NEXT: count:1'2 ~~~~~~~
+; CNT-V-NEXT: count:1'3 ? possible intended match
; CNT-NEXT: >>>>>>
; CNT-NOT: {{.}}
; NXT: {{.*}}error:{{.*}}
; NXT: <<<<<<
-; NXT-NEXT: 1: hello
+; NXT-NEXT: 1: hello
; NXT-V-NEXT: check:1 ^~~~~
-; NXT-NEXT: 2: again
+; NXT-NEXT: 2: again
; NXT-V-NEXT: next:2 ^~~~~
-; NXT-NEXT: 3:
-; NXT-NEXT: next:3 X error: no match found
+; NXT-NEXT: next:3 X error: no match found
; NXT-NEXT: >>>>>>
; NXT-NOT: {{.}}
; RUN: | FileCheck -match-full-lines %s -check-prefix=NXT2
; NXT2: <<<<<<
-; NXT2-NEXT: 1: hello
-; NXT2-NEXT: 2: again
-; NXT2-NEXT: 3: yonder
-; NXT2-NEXT: 4: world
-; NXT2-NEXT: next:3 !~~~~ error: match on wrong line
+; NXT2-NEXT: 1: hello
+; NXT2-NEXT: 2: again
+; NXT2-NEXT: 3: yonder
+; NXT2-NEXT: 4: world
+; NXT2-NEXT: next:3 !~~~~ error: match on wrong line
; NXT2-NEXT: >>>>>>
; NXT2-NOT: {{.}}
; SAM: {{.*}}error:{{.*}}
; SAM: <<<<<<
-; SAM-NEXT: 1: hello world!
+; SAM-NEXT: 1: hello world!
; SAM-V-NEXT: check:1 ^~~~~
; SAM-V-NEXT: same:2 ^~~~~
-; SAM-NEXT: same:3 X error: no match found
+; SAM-NEXT: same:3 X~ error: no match found
; SAM-NEXT: >>>>>>
; SAM-NOT: {{.}}
; SAM2: {{.*}}error:{{.*}}
; SAM2: <<<<<<
-; SAM2-NEXT: 1: hello world!
+; SAM2-NEXT: 1: hello world!
; SAM2-NEXT: check:1 ^~~~~
; SAM2-NEXT: same:2 ^~~~~
-; SAM2-NEXT: 2: again
-; SAM2-NEXT: same:3 !~~~~ error: match on wrong line
+; SAM2-NEXT: 2: again
+; SAM2-NEXT: same:3 !~~~~ error: match on wrong line
; SAM2-NEXT: >>>>>>
; SAM2-NOT: {{.}}
; EMP: {{.*}}error:{{.*}}
; EMP: <<<<<<
-; EMP-NEXT: 1: hello
+; EMP-NEXT: 1: hello
; EMP-V-NEXT: check:1 ^~~~~
; EMP-NEXT: 2:
; EMP-V-NEXT: empty:2 ^
-; EMP-NEXT: 3: world
-; EMP-NEXT: empty:3 X~~~~ error: no match found
-; EMP-NEXT: 4: label
+; EMP-NEXT: empty:3 X error: no match found
+; EMP-NEXT: 3: world
+; EMP-NEXT: empty:3 ~~~~~~
+; EMP-NEXT: 4: label
; EMP-V-NEXT: label:4 ^~~~~
; EMP-NEXT: empty:3 ~~~~~
; EMP-NEXT: >>>>>>
; EMP2: {{.*}}error:{{.*}}
; EMP2: <<<<<<
-; EMP2-NEXT: 1: hello
+; EMP2-NEXT: 1: hello
; EMP2-V-NEXT: check:1 ^~~~~
-; EMP2-NEXT: 2: world
+; EMP2-NEXT: 2: world
; EMP2-NEXT: 3:
-; EMP2-NEXT: empty:2 ! error: match on wrong line
+; EMP2-NEXT: empty:2 ! error: match on wrong line
; EMP2-NEXT: >>>>>>
; EMP2-NOT: {{.}}
; NOT: {{.*}}error:{{.*}}
; NOT: <<<<<<
-; NOT-NEXT: 1: hello
-; NOT-VV-NEXT: not:1 X~~~~
-; NOT-NEXT: 2: world
-; NOT-VV-NEXT: not:1 ~~~~~
-; NOT-NEXT: not:2 !~~~~ error: no match expected
-; NOT-NEXT: 3: again
-; NOT-VV-NEXT: not:1 ~~~~~
+; NOT-NEXT: 1: hello
+; NOT-VV-NEXT: not:1 X~~~~~
+; NOT-NEXT: 2: world
+; NOT-VV-NEXT: not:1 ~~~~~~
+; NOT-NEXT: not:2 !~~~~ error: no match expected
+; NOT-NEXT: 3: again
+; NOT-VV-NEXT: not:1 ~~~~~~
; NOT-VV-NEXT: 4:
; NOT-VV-NEXT: eof:2 ^
; NOT-NEXT: >>>>>>
; NOT2: {{.*}}error:{{.*}}
; NOT2: <<<<<<
-; NOT2-NEXT: 1: hello
-; NOT2-VV-NEXT: not:1 X~~~~
-; NOT2-NEXT: 2: world
-; NOT2-VV-NEXT: not:1 ~~~~~
-; NOT2-NEXT: not:2 !~~~~ error: no match expected
-; NOT2-NEXT: 3: again
+; NOT2-NEXT: 1: hello
+; NOT2-VV-NEXT: not:1 X~~~~~
+; NOT2-NEXT: 2: world
+; NOT2-VV-NEXT: not:1 ~~~~~~
+; NOT2-NEXT: not:2 !~~~~ error: no match expected
+; NOT2-NEXT: 3: again
; NOT2-V-NEXT: check:3 ^~~
; NOT2-VV-NEXT: not:1 ~~
; NOT2-NEXT: >>>>>>
; DAG: {{.*}}error:{{.*}}
; DAG: <<<<<<
-; DAG-NEXT: 1: abc
+; DAG-NEXT: 1: abc
; DAG-V-NEXT: dag:2 ^~~
-; DAG-VV-NEXT: dag:3'0 !~~ discard: overlaps earlier match
-; DAG-NEXT: 2: def
+; DAG-VV-NEXT: dag:3'0 !~~ discard: overlaps earlier match
+; DAG-NEXT: 2: def
; DAG-V-NEXT: dag:1 ^~~
-; DAG-VV-NEXT: dag:4'0 !~~ discard: overlaps earlier match
-; DAG-NEXT: 3: abc
+; DAG-VV-NEXT: dag:4'0 !~~ discard: overlaps earlier match
+; DAG-Q-NEXT: dag:4 X error: no match found
+; DAG-VQ-NEXT: dag:4 X error: no match found
+; DAG-VV-NEXT: dag:4'1 X error: no match found
+; DAG-NEXT: 3: abc
; DAG-VQ-NEXT: dag:3 ^~~
; DAG-VV-NEXT: dag:3'1 ^~~
-; DAG-Q-NEXT: dag:4 X~~ error: no match found
-; DAG-VQ-NEXT: dag:4 X~~ error: no match found
-; DAG-VV-NEXT: dag:4'1 X~~ error: no match found
+; DAG-Q-NEXT: dag:4 ~~~~
+; DAG-VQ-NEXT: dag:4 ~~~~
+; DAG-VV-NEXT: dag:4'1 ~~~~
; DAG-NEXT: >>>>>>
; DAG-NOT: {{.}}
; DAG1L:{{.*}}error:{{.*}}
; DAG1L:<<<<<<
-; DAG1L-NEXT: 1: abc def abc def
+; DAG1L-NEXT: 1: abc def abc def
; DAG1L-V-NEXT:dag:1 ^~~
; DAG1L-V-NEXT:dag:2 ^~
-; DAG1L-VV-NEXT:dag:3'0 !~~ discard: overlaps earlier match
+; DAG1L-VV-NEXT:dag:3'0 !~~ discard: overlaps earlier match
; DAG1L-VQ-NEXT:dag:3 ^~~
; DAG1L-VV-NEXT:dag:3'1 ^~~
-; DAG1L-VV-NEXT:dag:4'0 !~ discard: overlaps earlier match
+; DAG1L-VV-NEXT:dag:4'0 !~ discard: overlaps earlier match
; DAG1L-VQ-NEXT:dag:4 ^~
; DAG1L-VV-NEXT:dag:4'1 ^~
-; DAG1L-VV-NEXT:dag:5'0 !~~ discard: overlaps earlier match
-; DAG1L-VV-NEXT:dag:5'1 !~~ discard: overlaps earlier match
-; DAG1L-Q-NEXT:dag:5 X error: no match found
-; DAG1L-VQ-NEXT:dag:5 X error: no match found
-; DAG1L-VV-NEXT:dag:5'2 X error: no match found
+; DAG1L-VV-NEXT:dag:5'0 !~~ discard: overlaps earlier match
+; DAG1L-VV-NEXT:dag:5'1 !~~ discard: overlaps earlier match
+; DAG1L-Q-NEXT:dag:5 X~ error: no match found
+; DAG1L-VQ-NEXT:dag:5 X~ error: no match found
+; DAG1L-VV-NEXT:dag:5'2 X~ error: no match found
; DAG1L-NEXT:>>>>>>
; DAG1L-NOT:{{.}}
; LAB: {{.*}}possible intended match{{.*}}
; LAB: <<<<<<
-; LAB-NEXT: 1: lab0
+; LAB-NEXT: 1: lab0
; LAB-V-NEXT: label:1'0 ^~~~
; LAB-V-NEXT: label:1'1 ^~~~
-; LAB-NEXT: 2: foo
-; LAB-NEXT: label:3'0 X~~ error: no match found
-; LAB-NEXT: 3: lab1
+; LAB-NEXT: label:3'0 X error: no match found
+; LAB-NEXT: 2: foo
+; LAB-NEXT: label:3'0 ~~~~
+; LAB-NEXT: 3: lab1
+; LAB-NEXT: label:3'0 ~~~~~
+; LAB-NEXT: label:3'1 ? possible intended match
+; LAB-NEXT: 4: bar
; LAB-NEXT: label:3'0 ~~~~
-; LAB-NEXT: label:3'1 ? possible intended match
-; LAB-NEXT: 4: bar
-; LAB-NEXT: label:3'0 ~~~
; LAB-NEXT: >>>>>>
; LAB-NOT: {{.}}
; IMPNOT:{{.*}}error:{{.*}}
; IMPNOT:<<<<<<
-; IMPNOT-NEXT: 1: hello world again!
+; IMPNOT-NEXT: 1: hello world again!
; IMPNOT-V-NEXT:check:1 ^~~
; IMPNOT-VV-NEXT:not:imp1 X
; IMPNOT-VV-NEXT:not:imp2 X
; IMPNOT-V-NEXT:check:3 ^
; IMPNOT-VV-NEXT:not:imp1 X~~~~~~~
; IMPNOT-VV-NEXT:not:imp2 X~~~~~~~
-; IMPNOT-NEXT:not:imp3 !~~~~ error: no match expected
+; IMPNOT-NEXT:not:imp3 !~~~~ error: no match expected
; IMPNOT-NEXT:>>>>>>
; IMPNOT-NOT:{{.}}
; RUN: | FileCheck -match-full-lines %s -check-prefix=SUBST-POS
; SUBST-POS:<<<<<<
-; SUBST-POS-NEXT: 1: def-match1 def-match2
+; SUBST-POS-NEXT: 1: def-match1 def-match2
; SUBST-POS-NEXT:check:1'0 ^~~~~~~~~~~~~~~~~~~~~
-; SUBST-POS-NEXT:check:1'1 with "DEF_MATCH1" equal to "def-match1"
-; SUBST-POS-NEXT:check:1'2 with "DEF_MATCH2" equal to "def-match2"
-; SUBST-POS-NEXT: 2: def-match1 def-nomatch
-; SUBST-POS-NEXT:check:2'0 X~~~~~~~~~~~~~~~~~~~~~ error: no match found
+; SUBST-POS-NEXT:check:1'1 with "DEF_MATCH1" equal to "def-match1"
+; SUBST-POS-NEXT:check:1'2 with "DEF_MATCH2" equal to "def-match2"
+; SUBST-POS-NEXT:check:2'0 X error: no match found
; SUBST-POS-NEXT:check:2'1 with "DEF_MATCH1" equal to "def-match1"
; SUBST-POS-NEXT:check:2'2 uses undefined variable(s): "UNDEF"
; SUBST-POS-NEXT:check:2'3 with "DEF_NOMATCH" equal to "foobar"
-; SUBST-POS-NEXT:check:2'4 ? possible intended match
+; SUBST-POS-NEXT: 2: def-match1 def-nomatch
+; SUBST-POS-NEXT:check:2'0 ~~~~~~~~~~~~~~~~~~~~~~~
+; SUBST-POS-NEXT:check:2'4 ? possible intended match
; SUBST-POS-NEXT:>>>>>>
;--------------------------------------------------
; RUN: | FileCheck -match-full-lines %s -check-prefix=SUBST-NEG
; SUBST-NEG:<<<<<<
-; SUBST-NEG-NEXT: 1: def-match1 def-nomatch
-; SUBST-NEG-NEXT:not:1'0 X~~~~~~~~~~~~~~~~~~~~~
-; SUBST-NEG-NEXT:not:1'1 with "DEF_MATCH1" equal to "def-match1"
-; SUBST-NEG-NEXT:not:1'2 uses undefined variable(s): "UNDEF"
-; SUBST-NEG-NEXT:not:1'3 with "DEF_NOMATCH" equal to "foobar"
-; SUBST-NEG-NEXT: 2: def-match1 def-match2
-; SUBST-NEG-NEXT:not:1'0 ~~~~~~~~~~~~~~~~~~~~~
-; SUBST-NEG-NEXT:not:2'0 !~~~~~~~~~~~~~~~~~~~~ error: no match expected
-; SUBST-NEG-NEXT:not:2'1 with "DEF_MATCH1" equal to "def-match1"
-; SUBST-NEG-NEXT:not:2'2 with "DEF_MATCH2" equal to "def-match2"
-; SUBST-NEG-NEXT: 3: END
+; SUBST-NEG-NEXT: 1: def-match1 def-nomatch
+; SUBST-NEG-NEXT:not:1'0 X~~~~~~~~~~~~~~~~~~~~~~
+; SUBST-NEG-NEXT:not:1'1 with "DEF_MATCH1" equal to "def-match1"
+; SUBST-NEG-NEXT:not:1'2 uses undefined variable(s): "UNDEF"
+; SUBST-NEG-NEXT:not:1'3 with "DEF_NOMATCH" equal to "foobar"
+; SUBST-NEG-NEXT: 2: def-match1 def-match2
+; SUBST-NEG-NEXT:not:1'0 ~~~~~~~~~~~~~~~~~~~~~~
+; SUBST-NEG-NEXT:not:2'0 !~~~~~~~~~~~~~~~~~~~~ error: no match expected
+; SUBST-NEG-NEXT:not:2'1 with "DEF_MATCH1" equal to "def-match1"
+; SUBST-NEG-NEXT:not:2'2 with "DEF_MATCH2" equal to "def-match2"
+; SUBST-NEG-NEXT: 3: END
; SUBST-NEG-NEXT:check:3 ^~~
; SUBST-NEG-NEXT:>>>>>>
; RUN: | FileCheck -strict-whitespace -match-full-lines %s -check-prefix=CAPTURE-NEG
; CAPTURE-NEG:<<<<<<
-; CAPTURE-NEG-NEXT: 1: strvar: foo
+; CAPTURE-NEG-NEXT: 1: strvar: foo
; CAPTURE-NEG-NEXT:check:1'0 ^~~~~~~~~~~
-; CAPTURE-NEG-NEXT:check:1'1 ^~~ captured var "STRVAR"
-; CAPTURE-NEG-NEXT: 2: numvar no expr: 51
+; CAPTURE-NEG-NEXT:check:1'1 ^~~ captured var "STRVAR"
+; CAPTURE-NEG-NEXT: 2: numvar no expr: 51
; CAPTURE-NEG-NEXT:check:2'0 ^~~~~~~~~~~~~~~~~~
-; CAPTURE-NEG-NEXT:check:2'1 ^~ captured var "NUMVAR_NO_EXPR"
-; CAPTURE-NEG-NEXT: 3: numvar expr: -49
+; CAPTURE-NEG-NEXT:check:2'1 ^~ captured var "NUMVAR_NO_EXPR"
+; CAPTURE-NEG-NEXT: 3: numvar expr: -49
; CAPTURE-NEG-NEXT:check:3'0 ^~~~~~~~~~~~~~~~
-; CAPTURE-NEG-NEXT:check:3'1 with "%d,NUMVAR_EXPR:2-NUMVAR_NO_EXPR" equal to "-49"
-; CAPTURE-NEG-NEXT:check:3'2 ^~~ captured var "NUMVAR_EXPR"
-; CAPTURE-NEG-NEXT: 4: many: foo 100 8 bar
+; CAPTURE-NEG-NEXT:check:3'1 with "%d,NUMVAR_EXPR:2-NUMVAR_NO_EXPR" equal to "-49"
+; CAPTURE-NEG-NEXT:check:3'2 ^~~ captured var "NUMVAR_EXPR"
+; CAPTURE-NEG-NEXT: 4: many: foo 100 8 bar
; CAPTURE-NEG-NEXT:check:4'0 ^~~~~~~~~~~~~~~~~~~
-; CAPTURE-NEG-NEXT:check:4'1 ^~~ captured var "VAR1"
-; CAPTURE-NEG-NEXT:check:4'2 ^~~ captured var "VAR3"
-; CAPTURE-NEG-NEXT:check:4'3 ^ captured var "VAR2"
-; CAPTURE-NEG-NEXT:check:4'4 ^~~ captured var "VAR4"
-; CAPTURE-NEG-NEXT: 5: var in neg match: foo
-; CAPTURE-NEG-NEXT:not:5'0 !~~~~~~~~~~~~~~~~~~~~ error: no match expected
-; CAPTURE-NEG-NEXT:not:5'1 !~~ captured var "VAR"
-; CAPTURE-NEG-NEXT: 6: END
+; CAPTURE-NEG-NEXT:check:4'1 ^~~ captured var "VAR1"
+; CAPTURE-NEG-NEXT:check:4'2 ^~~ captured var "VAR3"
+; CAPTURE-NEG-NEXT:check:4'3 ^ captured var "VAR2"
+; CAPTURE-NEG-NEXT:check:4'4 ^~~ captured var "VAR4"
+; CAPTURE-NEG-NEXT: 5: var in neg match: foo
+; CAPTURE-NEG-NEXT:not:5'0 !~~~~~~~~~~~~~~~~~~~~ error: no match expected
+; CAPTURE-NEG-NEXT:not:5'1 !~~ captured var "VAR"
+; CAPTURE-NEG-NEXT: 6: END
; CAPTURE-NEG-NEXT:check:6 ^~~
; CAPTURE-NEG-NEXT:>>>>>>
; RUN: | FileCheck -match-full-lines %s -check-prefix=SUBST_NEXT
; SUBST_NEXT:<<<<<<
-; SUBST_NEXT-NEXT: 1: pre var
+; SUBST_NEXT-NEXT: 1: pre var
; SUBST_NEXT-NEXT:check:1 ^~~
-; SUBST_NEXT-NEXT:next:2'0 !~~ error: match on wrong line
-; SUBST_NEXT-NEXT:next:2'1 with "VAR" equal to "var"
+; SUBST_NEXT-NEXT:next:2'0 !~~ error: match on wrong line
+; SUBST_NEXT-NEXT:next:2'1 with "VAR" equal to "var"
; SUBST_NEXT-NEXT:>>>>>>
;- - - - - - - - - - - - - - - - - - - - - - - - -
; RUN: | FileCheck -match-full-lines %s -check-prefix=SUBST_SAME
; SUBST_SAME:<<<<<<
-; SUBST_SAME-NEXT: 1: pre
+; SUBST_SAME-NEXT: 1: pre
; SUBST_SAME-NEXT:check:1 ^~~
-; SUBST_SAME-NEXT: 2: var
-; SUBST_SAME-NEXT:same:2'0 !~~ error: match on wrong line
-; SUBST_SAME-NEXT:same:2'1 with "VAR" equal to "var"
+; SUBST_SAME-NEXT: 2: var
+; SUBST_SAME-NEXT:same:2'0 !~~ error: match on wrong line
+; SUBST_SAME-NEXT:same:2'1 with "VAR" equal to "var"
; SUBST_SAME-NEXT:>>>>>>
;- - - - - - - - - - - - - - - - - - - - - - - - -
; RUN: | FileCheck -match-full-lines %s -check-prefix=SUBST_DAG
; SUBST_DAG:<<<<<<
-; SUBST_DAG-NEXT: 1: var
+; SUBST_DAG-NEXT: 1: var
; SUBST_DAG-NEXT:dag:1 ^~~
-; SUBST_DAG-NEXT:dag:2'0 !~~ discard: overlaps earlier match
-; SUBST_DAG-NEXT:dag:2'1 with "VAR" equal to "var"
-; SUBST_DAG-NEXT: 2: var
+; SUBST_DAG-NEXT:dag:2'0 !~~ discard: overlaps earlier match
+; SUBST_DAG-NEXT:dag:2'1 with "VAR" equal to "var"
+; SUBST_DAG-NEXT: 2: var
; SUBST_DAG-NEXT:dag:2'2 ^~~
-; SUBST_DAG-NEXT:dag:2'3 with "VAR" equal to "var"
-; SUBST_DAG-NEXT: 3: END
+; SUBST_DAG-NEXT:dag:2'3 with "VAR" equal to "var"
+; SUBST_DAG-NEXT: 3: END
; SUBST_DAG-NEXT:check:3 ^~~
; SUBST_DAG-NEXT:>>>>>>
; CS-NEXT: .
; CS-NEXT: .
; CS-NEXT: .
-; C5-NEXT: 1: foo8
-; C5-NEXT: 2: foo7
-; C5-NEXT: 3: foo6
-; C5-NEXT: 4: foo5
-; C4-NEXT: 5: foo4
-; C3-NEXT: 6: foo3
-; C2-NEXT: 7: foo2
-; C1-NEXT: 8: foo1
-; C0-NEXT: 9: lab1 hello
+; C5-NEXT: 1: foo8
+; C5-NEXT: 2: foo7
+; C5-NEXT: 3: foo6
+; C5-NEXT: 4: foo5
+; C4-NEXT: 5: foo4
+; C3-NEXT: 6: foo3
+; C2-NEXT: 7: foo2
+; C1-NEXT: 8: foo1
+; C0-NEXT: 9: lab1 hello
; C0-NEXT: label:1'0 ^~~~
; C0-NEXT: label:1'1 ^~~~
-; C0-NEXT: next:2 !~~~~ error: match on wrong line
-; C1-NEXT: 10: foo1
-; C2-NEXT: 11: foo2
-; C3-NEXT: 12: foo3
-; C4-NEXT: 13: foo4
-; C5-NEXT: 14: foo5
-; C6-NEXT: 15: foo6
-; C6-NEXT: 16: foo7
+; C0-NEXT: next:2 !~~~~ error: match on wrong line
+; C1-NEXT: 10: foo1
+; C2-NEXT: 11: foo2
+; C3-NEXT: 12: foo3
+; C4-NEXT: 13: foo4
+; C5-NEXT: 14: foo5
+; C6-NEXT: 15: foo6
+; C6-NEXT: 16: foo7
; CM-NEXT: .
; CM-NEXT: .
; CM-NEXT: .
-; C6-NEXT: 17: foo7
-; C6-NEXT: 18: foo6
-; C5-NEXT: 19: foo5
-; C4-NEXT: 20: foo4
-; C3-NEXT: 21: foo3
-; C2-NEXT: 22: foo2
-; C1-NEXT: 23: foo1
-; C0-NEXT: 24: lab2 world
+; C6-NEXT: 17: foo7
+; C6-NEXT: 18: foo6
+; C5-NEXT: 19: foo5
+; C4-NEXT: 20: foo4
+; C3-NEXT: 21: foo3
+; C2-NEXT: 22: foo2
+; C1-NEXT: 23: foo1
+; C0-NEXT: 24: lab2 world
; C0-NEXT: label:3 ^~~~
-; C0-NEXT: next:4 !~~~~ error: match on wrong line
-; C1-NEXT: 25: foo1
-; C2-NEXT: 26: foo2
-; C3-NEXT: 27: foo3
-; C4-NEXT: 28: foo4
-; C5-NEXT: 29: foo5
-; C6-NEXT: 30: foo6
-; C7-NEXT: 31: foo7
-; C7-NEXT: 32: foo8
-; C7-NEXT: 33: foo9
-; C7-NEXT: 34: foo0
+; C0-NEXT: next:4 !~~~~ error: match on wrong line
+; C1-NEXT: 25: foo1
+; C2-NEXT: 26: foo2
+; C3-NEXT: 27: foo3
+; C4-NEXT: 28: foo4
+; C5-NEXT: 29: foo5
+; C6-NEXT: 30: foo6
+; C7-NEXT: 31: foo7
+; C7-NEXT: 32: foo8
+; C7-NEXT: 33: foo9
+; C7-NEXT: 34: foo0
; CE-NEXT: .
; CE-NEXT: .
; CE-NEXT: .
; RUN: echo ' CHECK-NEXT: world' >> %t.wide.chk
; W5: <<<<<<
-; W5: 9: lab1 hello
+; W5: 9: lab1 hello
; W5-NEXT: label:1'0 ^~~~
; W5-NEXT: label:1'1 ^~~~
; W5-NEXT: check:2 ^~~~~
-; W5-NEXT: 10: foo1
-; W5-NEXT: check:3 X~~~ error: no match found
-; W5-NEXT: 11: foo2
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 12: foo3
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 13: foo4
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 14: foo5
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 15: foo6
-; W5-NEXT: check:3 ~~~~
-; W6-NEXT: 16: foo7
-; W6-NEXT: check:3 ~~~~
+; W5-NEXT: check:3'0 X error: no match found
+; W5-NEXT: 10: foo1
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: check:3'1 ? possible intended match
+; W5-NEXT: 11: foo2
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 12: foo3
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 13: foo4
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 14: foo5
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 15: foo6
+; W5-NEXT: check:3'0 ~~~~~
+; W6-NEXT: 16: foo7
+; W6-NEXT: check:3'0 ~~~~~
; WM-NEXT: .
; WM-NEXT: .
; WM-NEXT: .
-; W6-NEXT: 17: foo7
-; W6-NEXT: check:3 ~~~~
-; W6-NEXT: 18: foo6
-; W6-NEXT: check:3 ~~~~
-; W5-NEXT: 19: foo5
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 20: foo4
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 21: foo3
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 22: foo2
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 23: foo1
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: 24: lab2 world
+; W6-NEXT: 17: foo7
+; W6-NEXT: check:3'0 ~~~~~
+; W6-NEXT: 18: foo6
+; W6-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 19: foo5
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 20: foo4
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 21: foo3
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 22: foo2
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 23: foo1
+; W5-NEXT: check:3'0 ~~~~~
+; W5-NEXT: 24: lab2 world
; W5-NEXT: label:4 ^~~~
-; W5-NEXT: check:3 ~~~~
-; W5-NEXT: next:5 !~~~~ error: match on wrong line
+; W5-NEXT: check:3'0 ~~~~
+; W5-NEXT: next:5 !~~~~ error: match on wrong line
;--------------------------------------------------
; Check -dump-input-context=<bad value>.
; DUMP-OK: Input was:
; DUMP-OK-NEXT: <<<<<<
-; DUMP-OK-NEXT: 1: hello
+; DUMP-OK-NEXT: 1: hello
; DUMP-OK-NEXT: check:1 ^~~~~
-; DUMP-OK-NEXT: 2: world
+; DUMP-OK-NEXT: 2: world
; DUMP-OK-NEXT: next:2 ^~~~~
; DUMP-OK-NEXT: >>>>>>
; DUMP-ERR: Input was:
; DUMP-ERR-NEXT: <<<<<<
-; DUMP-ERR-NEXT: 1: hello
+; DUMP-ERR-NEXT: 1: hello
; DUMP-ERR-V-NEXT: check:1 ^~~~~
-; DUMP-ERR-NEXT: 2: whirled
-; DUMP-ERR-NEXT: next:2 X~~~~~~ error: no match found
+; DUMP-ERR-NEXT: next:2'0 X error: no match found
+; DUMP-ERR-NEXT: 2: whirled
+; DUMP-ERR-NEXT: next:2'0 ~~~~~~~~
+; DUMP-ERR-NEXT: next:2'1 ? possible intended match
; DUMP-ERR-NEXT: >>>>>>
;--------------------------------------------------
; ALL: <<<<<<
-; ALL-NEXT: 1: start
+; ALL-NEXT: 1: start
; ALL-NEXT: check:1 ^~~~~
-; ALL-NEXT: 2: foo0
-; ALL-NEXT: 3: foo1
-; ALL-NEXT: 4: foo2
-; ALL-NEXT: 5: foo3
-; ALL-NEXT: 6: foo4
-; ALL-NEXT: 7: foo5
-; ALL-NEXT: 8: foo6
-; ALL-NEXT: 9: foo7
-; ALL-NEXT: 10: foo8
-; ALL-NEXT: 11: foo9
-; ALL-NEXT: 12: hello
+; ALL-NEXT: 2: foo0
+; ALL-NEXT: 3: foo1
+; ALL-NEXT: 4: foo2
+; ALL-NEXT: 5: foo3
+; ALL-NEXT: 6: foo4
+; ALL-NEXT: 7: foo5
+; ALL-NEXT: 8: foo6
+; ALL-NEXT: 9: foo7
+; ALL-NEXT: 10: foo8
+; ALL-NEXT: 11: foo9
+; ALL-NEXT: 12: hello
; ALL-NEXT: check:2 ^~~~~
-; ALL-NEXT: 13: foo0
-; ALL-NEXT: check:3'0 X~~~ error: no match found
-; ALL-NEXT: 14: foo1
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 15: foo2
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 16: foo3
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 17: foo4
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 18: foo5
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 19: foo6
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 20: foo7
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 21: foo8
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 22: foo9
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 23: word
-; ALL-NEXT: check:3'0 ~~~~
+; ALL-NEXT: check:3'0 X error: no match found
+; ALL-NEXT: 13: foo0
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 14: foo1
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 15: foo2
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 16: foo3
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 17: foo4
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 18: foo5
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 19: foo6
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 20: foo7
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 21: foo8
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 22: foo9
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 23: word
+; ALL-NEXT: check:3'0 ~~~~~
; ALL-NEXT: check:3'1 ? possible intended match
-; ALL-NEXT: 24: foo0
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 25: foo1
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 26: foo2
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 27: foo3
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 28: foo4
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 29: foo5
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 30: foo6
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 31: foo7
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 32: foo8
-; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 33: foo9
+; ALL-NEXT: 24: foo0
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 25: foo1
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 26: foo2
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 27: foo3
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 28: foo4
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 29: foo5
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 30: foo6
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 31: foo7
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 32: foo8
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 33: foo9
+; ALL-NEXT: check:3'0 ~~~~~
+; ALL-NEXT: 34: end
; ALL-NEXT: check:3'0 ~~~~
-; ALL-NEXT: 34: end
-; ALL-NEXT: check:3'0 ~~~
; ALL-NEXT: >>>>>>
; ANNOTATION-FULL: <<<<<<
-; ANNOTATION-FULL-NEXT: 1: start
+; ANNOTATION-FULL-NEXT: 1: start
; ANNOTATION-FULL-NEXT: check:1 ^~~~~
-; ANNOTATION-FULL-NEXT: 2: foo0
-; ANNOTATION-FULL-NEXT: 3: foo1
+; ANNOTATION-FULL-NEXT: 2: foo0
+; ANNOTATION-FULL-NEXT: 3: foo1
; ANNOTATION-FULL-NEXT: .
; ANNOTATION-FULL-NEXT: .
; ANNOTATION-FULL-NEXT: .
-; ANNOTATION-FULL-NEXT: 10: foo8
-; ANNOTATION-FULL-NEXT: 11: foo9
-; ANNOTATION-FULL-NEXT: 12: hello
+; ANNOTATION-FULL-NEXT: 10: foo8
+; ANNOTATION-FULL-NEXT: 11: foo9
+; ANNOTATION-FULL-NEXT: 12: hello
; ANNOTATION-FULL-NEXT: check:2 ^~~~~
-; ANNOTATION-FULL-NEXT: 13: foo0
-; ANNOTATION-FULL-NEXT: check:3'0 X~~~ error: no match found
-; ANNOTATION-FULL-NEXT: 14: foo1
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 15: foo2
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 16: foo3
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 17: foo4
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 18: foo5
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 19: foo6
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 20: foo7
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 21: foo8
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 22: foo9
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 23: word
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
+; ANNOTATION-FULL-NEXT: check:3'0 X error: no match found
+; ANNOTATION-FULL-NEXT: 13: foo0
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 14: foo1
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 15: foo2
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 16: foo3
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 17: foo4
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 18: foo5
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 19: foo6
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 20: foo7
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 21: foo8
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 22: foo9
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 23: word
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
; ANNOTATION-FULL-NEXT: check:3'1 ? possible intended match
-; ANNOTATION-FULL-NEXT: 24: foo0
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 25: foo1
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 26: foo2
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 27: foo3
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 28: foo4
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 29: foo5
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 30: foo6
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 31: foo7
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 32: foo8
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 33: foo9
+; ANNOTATION-FULL-NEXT: 24: foo0
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 25: foo1
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 26: foo2
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 27: foo3
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 28: foo4
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 29: foo5
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 30: foo6
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 31: foo7
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 32: foo8
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 33: foo9
+; ANNOTATION-FULL-NEXT: check:3'0 ~~~~~
+; ANNOTATION-FULL-NEXT: 34: end
; ANNOTATION-FULL-NEXT: check:3'0 ~~~~
-; ANNOTATION-FULL-NEXT: 34: end
-; ANNOTATION-FULL-NEXT: check:3'0 ~~~
; ANNOTATION-FULL-NEXT: >>>>>>
; ANNOTATION: <<<<<<
-; ANNOTATION-NEXT: 1: start
+; ANNOTATION-NEXT: 1: start
; ANNOTATION-NEXT: check:1 ^~~~~
-; ANNOTATION-NEXT: 2: foo0
-; ANNOTATION-NEXT: 3: foo1
+; ANNOTATION-NEXT: 2: foo0
+; ANNOTATION-NEXT: 3: foo1
; ANNOTATION-NEXT: .
; ANNOTATION-NEXT: .
; ANNOTATION-NEXT: .
-; ANNOTATION-NEXT: 10: foo8
-; ANNOTATION-NEXT: 11: foo9
-; ANNOTATION-NEXT: 12: hello
+; ANNOTATION-NEXT: 10: foo8
+; ANNOTATION-NEXT: 11: foo9
+; ANNOTATION-NEXT: 12: hello
; ANNOTATION-NEXT: check:2 ^~~~~
-; ANNOTATION-NEXT: 13: foo0
-; ANNOTATION-NEXT: check:3'0 X~~~ error: no match found
-; ANNOTATION-NEXT: 14: foo1
-; ANNOTATION-NEXT: check:3'0 ~~~~
-; ANNOTATION-NEXT: 15: foo2
-; ANNOTATION-NEXT: check:3'0 ~~~~
+; ANNOTATION-NEXT: check:3'0 X error: no match found
+; ANNOTATION-NEXT: 13: foo0
+; ANNOTATION-NEXT: check:3'0 ~~~~~
+; ANNOTATION-NEXT: 14: foo1
+; ANNOTATION-NEXT: check:3'0 ~~~~~
; ANNOTATION-NEXT: .
; ANNOTATION-NEXT: .
; ANNOTATION-NEXT: .
-; ANNOTATION-NEXT: 21: foo8
-; ANNOTATION-NEXT: check:3'0 ~~~~
-; ANNOTATION-NEXT: 22: foo9
-; ANNOTATION-NEXT: check:3'0 ~~~~
-; ANNOTATION-NEXT: 23: word
-; ANNOTATION-NEXT: check:3'0 ~~~~
+; ANNOTATION-NEXT: 21: foo8
+; ANNOTATION-NEXT: check:3'0 ~~~~~
+; ANNOTATION-NEXT: 22: foo9
+; ANNOTATION-NEXT: check:3'0 ~~~~~
+; ANNOTATION-NEXT: 23: word
+; ANNOTATION-NEXT: check:3'0 ~~~~~
; ANNOTATION-NEXT: check:3'1 ? possible intended match
-; ANNOTATION-NEXT: 24: foo0
-; ANNOTATION-NEXT: check:3'0 ~~~~
-; ANNOTATION-NEXT: 25: foo1
-; ANNOTATION-NEXT: check:3'0 ~~~~
+; ANNOTATION-NEXT: 24: foo0
+; ANNOTATION-NEXT: check:3'0 ~~~~~
+; ANNOTATION-NEXT: 25: foo1
+; ANNOTATION-NEXT: check:3'0 ~~~~~
; ANNOTATION-NEXT: .
; ANNOTATION-NEXT: .
; ANNOTATION-NEXT: .
; ERROR-NEXT: .
; ERROR-NEXT: .
; ERROR-NEXT: .
-; ERROR-NEXT: 11: foo9
-; ERROR-NEXT: 12: hello
+; ERROR-NEXT: 10: foo8
+; ERROR-NEXT: 11: foo9
+; ERROR-NEXT: 12: hello
; ERROR-NEXT: check:2 ^~~~~
-; ERROR-NEXT: 13: foo0
-; ERROR-NEXT: check:3'0 X~~~ error: no match found
-; ERROR-NEXT: 14: foo1
-; ERROR-NEXT: check:3'0 ~~~~
-; ERROR-NEXT: 15: foo2
-; ERROR-NEXT: check:3'0 ~~~~
+; ERROR-NEXT: check:3'0 X error: no match found
+; ERROR-NEXT: 13: foo0
+; ERROR-NEXT: check:3'0 ~~~~~
+; ERROR-NEXT: 14: foo1
+; ERROR-NEXT: check:3'0 ~~~~~
; ERROR-NEXT: .
; ERROR-NEXT: .
; ERROR-NEXT: .
-; ERROR-NEXT: 21: foo8
-; ERROR-NEXT: check:3'0 ~~~~
-; ERROR-NEXT: 22: foo9
-; ERROR-NEXT: check:3'0 ~~~~
-; ERROR-NEXT: 23: word
-; ERROR-NEXT: check:3'0 ~~~~
+; ERROR-NEXT: 21: foo8
+; ERROR-NEXT: check:3'0 ~~~~~
+; ERROR-NEXT: 22: foo9
+; ERROR-NEXT: check:3'0 ~~~~~
+; ERROR-NEXT: 23: word
+; ERROR-NEXT: check:3'0 ~~~~~
; ERROR-NEXT: check:3'1 ? possible intended match
-; ERROR-NEXT: 24: foo0
-; ERROR-NEXT: check:3'0 ~~~~
-; ERROR-NEXT: 25: foo1
-; ERROR-NEXT: check:3'0 ~~~~
+; ERROR-NEXT: 24: foo0
+; ERROR-NEXT: check:3'0 ~~~~~
+; ERROR-NEXT: 25: foo1
+; ERROR-NEXT: check:3'0 ~~~~~
; ERROR-NEXT: .
; ERROR-NEXT: .
; ERROR-NEXT: .
; RUN: %t.not-err.chk < %t.not-err.in 2>&1 \
; RUN: | FileCheck %s -match-full-lines -check-prefixes=NOT-ERR
-; NOT-ERR: 1: foo
+; NOT-ERR: 1: foo
; NOT-ERR-NEXT: not:1 !~~ error: no match expected
;- - - - - - - - - - - - - - - - - - - - - - - - -
; RUN: %t.next-err.chk < %t.next-err.in 2>&1 \
; RUN: | FileCheck %s -match-full-lines -check-prefixes=NEXT-ERR
-; NEXT-ERR: 3: bar
-; NEXT-ERR-NEXT: next:2 !~~ error: match on wrong line
\ No newline at end of file
+; NEXT-ERR: 3: bar
+; NEXT-ERR-NEXT: next:2 !~~ error: match on wrong line
UNDEF-USE-MSG: numeric-expression.txt:[[#@LINE-1]]:17: error: {{U}}NDEF-USE-NEXT: expected string not found in input
UNDEF-USE-MSG-NEXT: {{U}}NDEF-USE-NEXT: UNDEFVAR: {{\[\[#UNDEFVAR1\+UNDEFVAR2\]\]}}
UNDEF-USE-MSG-NEXT: {{^}} ^{{$}}
-UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-6]]:1: note: scanning from here
-UNDEF-USE-MSG-NEXT: UNDEFVAR: 11
-UNDEF-USE-MSG-NEXT: {{^}}^{{$}}
-UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-9]]:1: note: uses undefined variable(s): "UNDEFVAR1" "UNDEFVAR2"
-UNDEF-USE-MSG-NEXT: UNDEFVAR: 11
-UNDEF-USE-MSG-NEXT: {{^}}^{{$}}
+UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-7]]:14: note: scanning from here
+UNDEF-USE-MSG-NEXT: UNDEF VAR USE
+UNDEF-USE-MSG-NEXT: {{^}} ^{{$}}
+UNDEF-USE-MSG-NEXT: numeric-expression.txt:[[#@LINE-10]]:14: note: uses undefined variable(s): "UNDEFVAR1" "UNDEFVAR2"
+UNDEF-USE-MSG-NEXT: UNDEF VAR USE
+UNDEF-USE-MSG-NEXT: {{^}} ^{{$}}
; Numeric expression with unsupported operator.
RUN: %ProtectFileCheckOutput \
VV-NEXT: verbose.txt:[[@LINE-17]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
VV-NEXT: {{C}}HECK-NOT: raboof{{$}}
VV-NEXT: {{^}} ^{{$}}
-VV-NEXT: verbose.txt:[[@LINE-22]]:1: note: scanning from here
-VV-NEXT: {{^}}bar{{$}}
-VV-NEXT: {{^}}^{{$}}
+VV-NEXT: verbose.txt:[[@LINE-23]]:4: note: scanning from here
+VV-NEXT: {{^}}foo{{$}}
+VV-NEXT: {{^}} ^{{$}}
STRVAR=foobar
STRVAR:foobar
VV-NEXT: verbose.txt:[[#@LINE-23]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
VV-NEXT: {{C}}HECK-NOT: {{[[][[]#NUMVAR [+] 1[]][]]$}}
VV-NEXT: {{^}} ^{{$}}
-VV-NEXT: verbose.txt:[[#@LINE-28]]:1: note: scanning from here
-VV-NEXT: {{^}}NUMVAR - 1:41{{$}}
-VV-NEXT: {{^}}^{{$}}
+VV-NEXT: verbose.txt:[[#@LINE-29]]:10: note: scanning from here
+VV-NEXT: {{^}}NUMVAR=42{{$}}
+VV-NEXT: {{^}} ^{{$}}
before empty
VV-NEXT: verbose.txt:[[@LINE-16]]:12: remark: {{C}}HECK-NOT: excluded string not found in input
VV-NEXT: {{C}}HECK-NOT: {{[{][{]z[}][}]yx$}}
VV-NEXT: {{^}} ^{{$}}
-VV-NEXT: verbose.txt:[[@LINE-20]]:1: note: scanning from here
-VV-NEXT: {{^C}}HECK: xyz{{$}}
-VV-NEXT: {{^}}^{{$}}
+VV-NEXT: verbose.txt:[[@LINE-21]]:4: note: scanning from here
+VV-NEXT: {{^}}xyz{{$}}
+VV-NEXT: {{^}} ^{{$}}
QUIET-NOT: {{.}}
V-NOT: {{.}}
// Labels for input lines.
OS << " - ";
WithColor(OS, raw_ostream::SAVEDCOLOR, true) << "L:";
- OS << " labels line number L of the input file\n";
+ OS << " labels line number L of the input file\n"
+ << " An extra space is added after each input line to represent"
+ << " the\n"
+ << " newline character\n";
// Labels for annotation lines.
OS << " - ";
COS.resetColor();
else if (WasInMatch && !InMatch)
COS.changeColor(raw_ostream::CYAN, true, true);
- if (*InputFilePtr == '\n')
+ if (*InputFilePtr == '\n') {
Newline = true;
- else
+ COS << ' ';
+ } else
COS << *InputFilePtr;
++InputFilePtr;
}
}
*LineOS << '\n';
- unsigned InputLineWidth = InputFilePtr - InputFileLine - Newline;
+ unsigned InputLineWidth = InputFilePtr - InputFileLine;
// Print any annotations.
while (AnnotationItr != AnnotationEnd &&