[PATCH] D60382: FileCheck [2/12]: Stricter parsing of -D option

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 11 12:34:20 PDT 2019


arsenm added inline comments.


================
Comment at: llvm/lib/Support/FileCheck.cpp:58-60
+  // Name can't start with a digit.
+  if (isdigit(static_cast<unsigned char>(Name[0])))
+    return true;
----------------
I think this should be split into a separate isValidVarNameStart function or something. I would also invert this to be a whitelist. We probably also need to at least disallow $, @, +, - and :


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60382





More information about the llvm-commits mailing list