[PATCH] D60387: FileCheck [7/12]: Arbitrary long numeric expressions

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 10:07:09 PDT 2019


grimar added inline comments.


================
Comment at: llvm/lib/Support/FileCheck.cpp:201
+    if (ParseVarResult) {
+      StringRef Name = *ParseVarResult;
+      return parseNumericVariableUse(Name, IsPseudo, SM);
----------------
grimar wrote:
> You can avoid having this temorarily variable:
> 
> ```
> if (ParseVarResult)
>   return parseNumericVariableUse(*ParseVarResult, IsPseudo, SM);
> ```
> 
> But actually it seems you also need to check the result of `Expected`,
> not sure why it is assumed there is no error?
Oh, sorry, I misread the code, you actually check it. Then you still can avoid having the temp var :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60387





More information about the llvm-commits mailing list