diff options
author | Chris Lattner <sabre@nondot.org> | 2009-08-16 02:22:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-08-16 02:22:31 +0000 |
commit | 107c21eafc2a2b028378946d669c1fd9c63ab432 (patch) | |
tree | ee47815e355a6702fa9be6c2e30e752b582550d9 /llvm/utils/FileCheck/FileCheck.cpp | |
parent | 9813beadcde16ccb8946b0fb62cf4ff72a045b4e (diff) | |
download | bcm5719-llvm-107c21eafc2a2b028378946d669c1fd9c63ab432.tar.gz bcm5719-llvm-107c21eafc2a2b028378946d669c1fd9c63ab432.zip |
when emitting errors about CHECK-NEXT directives, show the line that the
CHECK-NEXT is on.
llvm-svn: 79164
Diffstat (limited to 'llvm/utils/FileCheck/FileCheck.cpp')
-rw-r--r-- | llvm/utils/FileCheck/FileCheck.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp index f051e9e7e04..c092dedc63f 100644 --- a/llvm/utils/FileCheck/FileCheck.cpp +++ b/llvm/utils/FileCheck/FileCheck.cpp @@ -325,19 +325,23 @@ int main(int argc, char **argv) { unsigned NumNewLines = CountNumNewlinesBetween(LastMatch, Ptr); if (NumNewLines == 0) { - SM.PrintMessage(SMLoc::getFromPointer(Ptr), + SM.PrintMessage(CheckStr.Loc, CheckPrefix+"-NEXT: is on the same line as previous match", "error"); + SM.PrintMessage(SMLoc::getFromPointer(Ptr), + "'next' match was here", "note"); SM.PrintMessage(SMLoc::getFromPointer(LastMatch), "previous match was here", "note"); return 1; } if (NumNewLines != 1) { - SM.PrintMessage(SMLoc::getFromPointer(Ptr), + SM.PrintMessage(CheckStr.Loc, CheckPrefix+ "-NEXT: is not on the line after the previous match", "error"); + SM.PrintMessage(SMLoc::getFromPointer(Ptr), + "'next' match was here", "note"); SM.PrintMessage(SMLoc::getFromPointer(LastMatch), "previous match was here", "note"); return 1; |