Index: llvm/lib/FileCheck/FileCheck.cpp =================================================================== --- llvm/lib/FileCheck/FileCheck.cpp +++ llvm/lib/FileCheck/FileCheck.cpp @@ -1333,6 +1333,8 @@ OS << " "; E.log(OS); }); + if (!OS.tell()) + continue; } else { // Substitution succeeded. Print substituted value. OS << "with \""; Index: llvm/test/FileCheck/check-not-numeric-error.txt =================================================================== --- llvm/test/FileCheck/check-not-numeric-error.txt +++ llvm/test/FileCheck/check-not-numeric-error.txt @@ -2,10 +2,6 @@ ; and --implicit-check-not. Moreover, it only printed the error diagnostic if ; -vv was specified and input dumps were disabled. Test every combination as ; the logic is hard to get right. -; -; FIXME: We shouldn't have: (1) the blank note at the end of the trace, and -; (2) the redundant error at the end of the dump. These will be fixed in a -; subsequent patch. RUN: echo 'CHECK-NOT: [[#0x8000000000000000+0x8000000000000000]]' > %t.chk RUN: echo '10000000000000000' > %t.in @@ -26,9 +22,6 @@ ERR-NEXT:{{ *}}^ ERR-NEXT:{{.*}}: note: scanning from here ERR-NEXT:10000000000000000 - ERR-NEXT:^ - ERR-NEXT:{{.*}}: note: - ERR-NEXT:10000000000000000 ERR-NEXT:^ ERR-NOT:{{error|note|remark}}: @@ -36,7 +29,6 @@ DUMP-NEXT: 1: 10000000000000000 DUMP-NEXT:not:1'0 X~~~~~~~~~~~~~~~~~ error: match failed for invalid pattern DUMP-NEXT:not:1'1 unable to substitute variable or numeric expression: overflow error - DUMP-NEXT:not:1'2 X error: match failed for invalid pattern DUMP-VV-NEXT: 2: DUMP-VV-NEXT:eof:1 ^ DUMP-NEXT:>>>>>>