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

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 07:40:07 PDT 2019


probinson added inline comments.


================
Comment at: llvm/lib/Support/FileCheck.cpp:47
+    if (!ParsedOneChar && !isValidVarNameStart(Str[I]))
+      return true;
+
----------------
A whole lot of this loop appears to be handling just the optional initial `$`/`@` and then the initial `isValidVarNameStart` test.  I'd think it would be more readable to factor out the handling of the initial one or two characters, then loop over the rest.


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