[PATCH] D108623: [flang] Fix non-deterministic line output function

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 09:29:07 PDT 2021


Meinersbur added inline comments.


================
Comment at: flang/lib/Semantics/check-declarations.cpp:1155
   std::optional<parser::MessageFixedText> msg;
+  auto checkDefinedOperatorArgs = [&, opName, specific, proc]() {
+    bool arg0Defined = CheckDefinedOperatorArg(opName, specific, proc, 0);
----------------
kiranchandramohan wrote:
> Nit: You probably do not need "&"  in the capture list since you have explicitly captured the variables (opName, specific, proc) required.
> 
> 
`specific` and `proc` should be captured by-reference, at they are in the function arguments.

Even better, I'd convert all captures into lambda arguments, such that one can see at the call site what data the check depends on.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108623



More information about the llvm-commits mailing list