<div dir="ltr">This is in any case the wrong fix. The code *is* wrong, for the reason this compiler is reporting.<div><br></div><div>The correct fix is to declare the explicit specializations in the header file:</div><div><br></div><div>template <> void CFGDominatorTreeImpl<true>::anchor();</div><div>template <> void CFGDominatorTreeImpl<false>::anchor();<br><br></div><div>Clang will tell you to do this under -Wundefined-func-template (which we haven't turned on by default because people get this wrong too often...).</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 8 Jul 2019 at 12:29, JF Bastien via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="overflow-wrap: break-word;">Kristof,<div><br></div><div>It looks like your fix didn’t address all the bots:</div><div><br></div><div><span title="Compile Error" style="box-sizing:border-box;font-family:monospace;font-size:14px;white-space:pre-wrap;background-color:red">/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Analysis/Dominators.cpp:14:48: error: explicit specialization of 'anchor' after instantiation
</span><span style="color:rgb(51,51,51);font-family:monospace;font-size:14px;white-space:pre-wrap">void CFGDominatorTreeImpl</*IsPostDom=*/true>::anchor() {}
                                               ^
/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h:225:3: note: implicit instantiation first required here
  ControlDependencyCalculator(CFG *cfg)
  ^</span><br><div><br></div><div>Can you please address the issue?</div><div><a href="http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4153/consoleFull" target="_blank">http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4153/consoleFull</a></div><div><br></div><div>Thanks,</div><div><br></div><div>JF</div><div><br></div><div><br><blockquote type="cite"><div>On Jul 3, 2019, at 5:06 AM, Kristof Umann via cfe-commits <<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>> wrote:</div><br class="gmail-m_5491834518596508129Apple-interchange-newline"><div><div>Author: szelethus<br>Date: Wed Jul  3 05:06:10 2019<br>New Revision: 365030<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=365030&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=365030&view=rev</a><br>Log:<br>Make a buildbot using a buggy gcc happy<br><br>When specializing a template in a namespace, it has to be in a namespace<br>block, else gcc will get confused. Hopefully this fixes the issue.<br><br><a href="https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480" target="_blank">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480</a><br><br>Modified:<br>    cfe/trunk/lib/Analysis/Dominators.cpp<br><br>Modified: cfe/trunk/lib/Analysis/Dominators.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Dominators.cpp?rev=365030&r1=365029&r2=365030&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Dominators.cpp?rev=365030&r1=365029&r2=365030&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/Analysis/Dominators.cpp (original)<br>+++ cfe/trunk/lib/Analysis/Dominators.cpp Wed Jul  3 05:06:10 2019<br>@@ -8,10 +8,12 @@<br><br> #include "clang/Analysis/Analyses/Dominators.h"<br><br>-using namespace clang;<br>+namespace clang {<br><br> template <><br>-void clang::CFGDominatorTreeImpl</*IsPostDom=*/true>::anchor() {}<br>+void CFGDominatorTreeImpl</*IsPostDom=*/true>::anchor() {}<br><br> template <><br>-void clang::CFGDominatorTreeImpl</*IsPostDom=*/false>::anchor() {}<br>+void CFGDominatorTreeImpl</*IsPostDom=*/false>::anchor() {}<br>+<br>+} // end of namespace clang<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br><a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br></div></div></blockquote></div><br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div>