[LLVMbugs] [Bug 8020] clang c++ incorrectly accepts template keyword on non-template definition

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Sep 11 10:09:37 PDT 2013


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

Serge Pavlov <sepavloff at gmail.com> changed:

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

--- Comment #2 from Serge Pavlov <sepavloff at gmail.com> ---
Current version (190531) gives better message:

$ cat pr8020.cpp
template <typename T> struct X { X() {} };
template<> struct X<int> { X(); };
template X<int>::X() {}
$ clang pr8020.cpp 
pr8020.cpp:3:22: error: function cannot be defined in an explicit
instantiation; if this declaration is meant to be a function
      definition, remove the 'template' keyword
template X<int>::X() {}
                     ^
1 error generated.

-- 
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/20130911/278f3dd5/attachment.html>


More information about the llvm-bugs mailing list