[PATCH] D86222: Fix PR46880: Fail CHECK-NOT with undefined variable

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 12:10:08 PDT 2020


jdenny added inline comments.


================
Comment at: llvm/test/FileCheck/dump-input-annotations.txt:626
+; SUBST-POS-NEXT:check:2'0     X~~~~~~~~~~~~~~~~~~~~~ error: match error
+; SUBST-POS-NEXT:check:2'1                            uses undefined variable: "UNDEF"
 ; SUBST-POS-NEXT:>>>>>>
----------------
thopre wrote:
> jdenny wrote:
> > This test used to cover printing of variable definitions when a positive directive fails.  It no longer does.
> > 
> > A separate test could be added to cover that case.  But do we need to drop that info when a variable is undefined?  It could be helpful for debugging.
> We currently only print substitutions if there are no errors. I think if we want to print substitutions in case of undefined variable we should do it regardless of whether there are errors to be consistent. Obviously that means ignoring substitution errors in printSubstitutions
What's an example of an error besides undefined variable for which we currently don't print substitutions but you're suggesting we would?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86222



More information about the llvm-commits mailing list