<div dir="ltr">Hello,<div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The new patch is quiet a bit bigger, sorry for leading you that way.<br></blockquote><div><br></div><div>NP. It was funny to factorize the GraphTraits.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
As for the unit test, I intended for something far smaller. Basically<br>
just a test showing that foo and bar in your original email now<br>
compile.<br></blockquote><div><br></div><div>Added a couple minimal unit tests using static_assert. Without the right const specialization you get a build error like this:</div><div><br></div><div><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px">[ 94%] /Users/ettore/Work/llvm/src-public/unittests/Analysis/CallGraphTest.cpp:28:3: error: static_assert failed "Node type does not match"</p><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px"> static_assert(std::is_same<decltype(*I), NodeTy &>::value,</p><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px"> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px">/Users/ettore/Work/llvm/src-public/unittests/Analysis/CallGraphTest.cpp:61:3: note: in instantiation of function template specialization</p><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px"> '<anonymous namespace>::CanSpecializeGraphTraitsIterators<const llvm::CallGraph>' requested here</p><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px"> CanSpecializeGraphTraitsIterators(const_cast<const CallGraph *>(&CG));</p><p style="color:rgb(0,0,0);font-family:-apple-system-font;font-size:12px;line-height:16px"> ^</p></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Your original patch with a minimal uniti test is OK.</blockquote><div><br></div><div>OK thanks. Updated patch attached.</div><div><br></div><div>Thanks,</div><div>Ettore Speziale</div></div></div></div></div>