<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Thu, Feb 23, 2017 at 10:40 PM Sam McCall <<a href="mailto:sammccall@google.com">sammccall@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"><div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg">On Feb 23, 2017 8:48 PM, "Haojian Wu via Phabricator" <<a href="mailto:reviews@reviews.llvm.org" class="gmail_msg" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br type="attribution" class="gmail_msg"><blockquote class="m_-864003687959933514quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-864003687959933514quoted-text gmail_msg">hokein added inline comments.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
================<br class="gmail_msg">
</div>Comment at: unittests/include-fixer/find-all-symbols/FindAllSymbolsTests.cpp:40<br class="gmail_msg">
+ void reportSymbols(llvm::StringRef FileName,<br class="gmail_msg">
+ SymbolInfo::SignalMap NewSymbols) override {<br class="gmail_msg">
+ for (const auto &Entry : NewSymbols)<br class="gmail_msg">
----------------<br class="gmail_msg">
A new catch: `NewSymbols` should be passed by reference, otherwise a copy will be generated.<br class="gmail_msg"></blockquote></div></div></div></div><div dir="auto" class="gmail_msg"><div dir="auto" class="gmail_msg">I did actually intend by-value here, FindAllSymbols no longer needs the map once it's reported, so it is moved rather than copied (see the end of FindAllSymbols.cpp)</div><div dir="auto" class="gmail_msg"><br class="gmail_msg"></div><div dir="auto" class="gmail_msg">If this is too surprising, I can change it.</div></div></blockquote><div><br></div><div>I'd say that that couples the call site and the function too much.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto" class="gmail_msg"><div dir="auto" class="gmail_msg"><br class="gmail_msg"></div><div dir="auto" class="gmail_msg"><br class="gmail_msg"></div><div dir="auto" class="gmail_msg"><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="m_-864003687959933514quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg"><br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D30210" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D30210</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div><br class="gmail_msg"></div></div></div>
</blockquote></div></div>