vsavchenko added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:119
+
+  return makePersistent(std::move(Result));
+}
----------------
NoQ wrote:
> Given that we're certain from the start that the container will be 
> persistent, can we save a copy by directly asking the factory to allocate a 
> fresh container?
> 
> Also this seems to be one of the cases where variable-sized small vectors 
> would make sense.
Surprisingly this is not the case, it is cheaper to do whatever you want on 
small vectors on the stack and check if we already allocated it.
So, it is a deliberate choice to do it this way (you can see it in the comment 
inside of the `makePersistent` function.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86465

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

Reply via email to