[PATCH] D128467: [clang][dataflow] Allow MatchSwitch to return a value

Sam Estep via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 24 06:13:43 PDT 2022


samestep added inline comments.


================
Comment at: clang/include/clang/Analysis/FlowSensitive/MatchSwitch.h:49
 /// appropriate handler.
-template <typename State>
-using MatchSwitch = std::function<void(const Stmt &, ASTContext &, State &)>;
+template <typename State, typename Output = void>
+using MatchSwitch = std::function<Output(const Stmt &, ASTContext &, State &)>;
----------------
gribozavr2 wrote:
> WDYT? like a "function result"
Sure, `Result` is fine; changing it now.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128467



More information about the cfe-commits mailing list