[LLVMbugs] [Bug 11416] Assertion `NewTemplateDecl && "Template/non-template mismatch"' failed

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 2 04:06:01 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=11416

Serge Pavlov <sepavloff at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |sepavloff at gmail.com
         Resolution|---                         |WORKSFORME

--- Comment #1 from Serge Pavlov <sepavloff at gmail.com> ---
No more crash with ToT:

$ clang --version
clang version 3.7.0 (trunk 227734)
Target: x86_64-unknown-linux-gnu
Thread model: posix

$ clang pr11416.cpp 
pr11416.cpp:3:17: error: templates must have C++ linkage
                template <class R> class Sphere_d;
                ^~~~~~~~~~~~~~~~~~
pr11416.cpp:4:61: error: unknown type name 'Sphere_d'
                template <class R> bool equal_as_sets(const Sphere_d<R>&, const
Sphere_d<R>&);
                                                            ^
pr11416.cpp:4:69: error: expected ')'
                template <class R> bool equal_as_sets(const Sphere_d<R>&, const
Sphere_d<R>&);
                                                                    ^
pr11416.cpp:4:54: note: to match this '('
                template <class R> bool equal_as_sets(const Sphere_d<R>&, const
Sphere_d<R>&);
                                                     ^
pr11416.cpp:4:17: error: templates must have C++ linkage
                template <class R> bool equal_as_sets(const Sphere_d<R>&, const
Sphere_d<R>&);
                ^~~~~~~~~~~~~~~~~~
pr11416.cpp:5:17: error: templates must have C++ linkage
                template <class R> class Sphere_d_rep {
                ^~~~~~~~~~~~~~~~~~
5 errors generated.

Some of the reported errors are not necessary, fix
http://reviews.llvm.org/D7321 solves this problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150202/ccce1782/attachment.html>


More information about the llvm-bugs mailing list