[PATCH] D60384: FileCheck [4/12]: Introduce @LINE numeric expressions

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


arsenm added inline comments.


================
Comment at: llvm/include/llvm/Support/FileCheck.h:78-80
+  /// If this is a numeric expression substitution, this is the pointer to the
+  /// class representing that numeric expression.
+  std::shared_ptr<FileCheckNumExpr> NumExpr;
----------------
shared_ptr is almost always overkill


================
Comment at: llvm/include/llvm/Support/FileCheck.h:114-116
+  /// Return the name of the undefined variable used in this substitution if
+  /// any.
+  llvm::Optional<StringRef> getUndefVarName() const;
----------------
It seems silly to me to use Optional when you can use an empty string, and empty string isn't a valid name


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60384





More information about the llvm-commits mailing list