steakhal added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Core/ExprEngine.cpp:1053
- for (auto I : CleanedState->get<ObjectsUnderConstruction>()) {
+ for (const auto &I : CleanedState->get<ObjectsUnderConstruction>()) {
if (SymbolRef Sym = I.second.getAsSymbol())
----------------
I think this is supposed to be just some lightweight handle: some discriminator
and pointer under the hood. `sizeof(I)`
is just 40 bytes. Another point is that the copy construction is not
customized, so the `sizeof` for such objects should be a good proxy for
estimating how costly the copy is.
For me personally, if it fits into a cacheline (on `x86_64` I think its 64
bytes) (and ~trivially-copyable) then it should've probably taken by value.
I haven't measured this theory, so take it with a pinch of salt.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148639/new/
https://reviews.llvm.org/D148639
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits