llvm.org GIT mirror llvm / 0b2353f
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 Chris Lattner 10 years ago
1 changed file(s) with 6 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
324324
325325 unsigned NumNewLines = CountNumNewlinesBetween(LastMatch, Ptr);
326326 if (NumNewLines == 0) {
327 SM.PrintMessage(SMLoc::getFromPointer(Ptr),
327 SM.PrintMessage(CheckStr.Loc,
328328 CheckPrefix+"-NEXT: is on the same line as previous match",
329329 "error");
330 SM.PrintMessage(SMLoc::getFromPointer(Ptr),
331 "'next' match was here", "note");
330332 SM.PrintMessage(SMLoc::getFromPointer(LastMatch),
331333 "previous match was here", "note");
332334 return 1;
333335 }
334336
335337 if (NumNewLines != 1) {
336 SM.PrintMessage(SMLoc::getFromPointer(Ptr),
338 SM.PrintMessage(CheckStr.Loc,
337339 CheckPrefix+
338340 "-NEXT: is not on the line after the previous match",
339341 "error");
342 SM.PrintMessage(SMLoc::getFromPointer(Ptr),
343 "'next' match was here", "note");
340344 SM.PrintMessage(SMLoc::getFromPointer(LastMatch),
341345 "previous match was here", "note");
342346 return 1;