Szelethus added a comment.

Its becoming a bit difficult to navigate inlines, could you please mark them as 
done as you address them?



================
Comment at: clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp:61
+  using FnCheck = bool (StreamChecker::*)(const CallEvent &,
+                                          CheckerContext &) const;
+
----------------
Charusso wrote:
> I prefer `std::function`, because it is modern.
> ```
>   using StreamCheck = 
>       std::function<void(const StreamChecker *, const CallEvent &,
>                          CheckerContext &)>;
> ```
> I think it is fine with pointers, but at some point we need to modernize this.
But its also a lot more expensive. 
https://blog.demofox.org/2015/02/25/avoiding-the-performance-hazzards-of-stdfunction/

`std::function` is able to wrap lambdas with different captures and all sorts 
of things like that, which comes at a cost.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67706



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to