[PATCH] D83651: [FileCheck] Report captured variables

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 02:09:16 PDT 2020


thopre added inline comments.


================
Comment at: llvm/lib/Support/FileCheckImpl.h:117
   bool Negative;
+  StringRef StrValue;
 
----------------
I think I'd prefer this as a new field in NumericVariable. ExpressionValue is really an abstraction for signed/unsigned variable. It's used for all intermediate result of evaluating the AST of an expression and for all of those the StrValue means nothing and is of no interest. I realize the size penalty is small, it bothers me more on a conceptual level.

Does that make sense?


================
Comment at: llvm/test/FileCheck/dump-input-annotations.txt:680
+; RUN: echo 'CHECK: numvar no expr: [[#NUMVAR_NO_EXPR:]]' >> %t.chk
+; RUN: echo 'CHECK: numvar expr: [[#%d,NUMVAR_EXPR:-72]]' >> %t.chk
+; Capture many variables of different kinds in a different order than their
----------------
Although it will follow the same code path, I think I'd prefer a binary operation here rather than just a literal.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83651





More information about the llvm-commits mailing list