r365030 - Make a buildbot using a buggy gcc happy
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 8 12:37:14 PDT 2019
This is in any case the wrong fix. The code *is* wrong, for the reason this
compiler is reporting.
The correct fix is to declare the explicit specializations in the header
file:
template <> void CFGDominatorTreeImpl<true>::anchor();
template <> void CFGDominatorTreeImpl<false>::anchor();
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...).
On Mon, 8 Jul 2019 at 12:29, JF Bastien via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Kristof,
>
> It looks like your fix didn’t address all the bots:
>
> /Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Analysis/Dominators.cpp:14:48:
> error: explicit specialization of 'anchor' after instantiation 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) ^
>
> Can you please address the issue?
>
> http://green.lab.llvm.org/green/job/clang-stage2-coverage-R/4153/consoleFull
>
> Thanks,
>
> JF
>
>
> On Jul 3, 2019, at 5:06 AM, Kristof Umann via cfe-commits <
> cfe-commits at lists.llvm.org> wrote:
>
> Author: szelethus
> Date: Wed Jul 3 05:06:10 2019
> New Revision: 365030
>
> URL: http://llvm.org/viewvc/llvm-project?rev=365030&view=rev
> Log:
> Make a buildbot using a buggy gcc happy
>
> When specializing a template in a namespace, it has to be in a namespace
> block, else gcc will get confused. Hopefully this fixes the issue.
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
>
> Modified:
> cfe/trunk/lib/Analysis/Dominators.cpp
>
> Modified: cfe/trunk/lib/Analysis/Dominators.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/Dominators.cpp?rev=365030&r1=365029&r2=365030&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Analysis/Dominators.cpp (original)
> +++ cfe/trunk/lib/Analysis/Dominators.cpp Wed Jul 3 05:06:10 2019
> @@ -8,10 +8,12 @@
>
> #include "clang/Analysis/Analyses/Dominators.h"
>
> -using namespace clang;
> +namespace clang {
>
> template <>
> -void clang::CFGDominatorTreeImpl</*IsPostDom=*/true>::anchor() {}
> +void CFGDominatorTreeImpl</*IsPostDom=*/true>::anchor() {}
>
> template <>
> -void clang::CFGDominatorTreeImpl</*IsPostDom=*/false>::anchor() {}
> +void CFGDominatorTreeImpl</*IsPostDom=*/false>::anchor() {}
> +
> +} // end of namespace clang
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190708/8c63672b/attachment-0001.html>
More information about the cfe-commits
mailing list