[PATCH] D96653: [FileCheck] Add neighboring annotations for -dump-input-filter=error

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 15 07:04:22 PST 2021


jdenny added inline comments.


================
Comment at: llvm/utils/FileCheck/FileCheck.cpp:158-160
                           "Input lines with starting points of error "
+                          "annotations or with annotations that neighbor error "
                           "annotations")));
----------------
thopre wrote:
> Isn't there one too many "annotations" in that sentence?
Semantically and grammatically, I think it's correct.  Is your concern that so many occurrences of "annotations" makes it confusing?


================
Comment at: llvm/utils/FileCheck/FileCheck.cpp:517-518
+      // before the last line of an error, include it.  A CHECK-LABEL directive
+      // is processed before all other directives, so its annotation precedes
+      // the last line of an error that precedes it.  Don't apply that exception
+      // generally, or a CHECK-DAG error can produce a spurious inclusion due to
----------------
thopre wrote:
> Is this saying that for a LABEL match ending at line L, the annotation for an error on line L-1 would be after the annotation for the LABEL match end at line L? Or is the "that precedes it" redundant and this is just saying that in the case of an error end and a LABEL end on line L, the label is first?
An error can start on an earlier line than a label and end on the same line as the label, but, on that last line, the error is shown after the label.  I agree it's confusing, I'll add an example to the comments.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96653/new/

https://reviews.llvm.org/D96653



More information about the llvm-commits mailing list