aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-08-16 02:22:31 +0000
committerChris Lattner <sabre@nondot.org>2009-08-16 02:22:31 +0000
commit0b2353f277f7a92b48af20f9804c6c35d96ecb75 (patch)
tree0738c8765a6f207dec724d1a474976a8caa6f886 /utils
parent5c1c2082968ff4c36063ed09c4eea772eb808b6a (diff)
when emitting errors about CHECK-NEXT directives, show the line that the
CHECK-NEXT is on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79164 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/FileCheck/FileCheck.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/utils/FileCheck/FileCheck.cpp b/utils/FileCheck/FileCheck.cpp
index f051e9e7e0..c092dedc63 100644
--- a/utils/FileCheck/FileCheck.cpp
+++ b/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;