[llvm-bugs] [Bug 32359] New: extern template of template-overloaded function crashes

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 21 03:55:29 PDT 2017


            Bug ID: 32359
           Summary: extern template of template-overloaded function
           Product: clang
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: bloerwald at googlemail.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18140
  --> https://bugs.llvm.org/attachment.cgi?id=18140&action=edit
backtrace of clang 3.9.1 crash

The source

  struct trait {
    struct type;

  template<typename Trait> struct templ {
    templ (typename Trait::type);
    template<typename Direct> templ (Direct);

  extern template templ<trait>::templ (trait::type);

where the `templ` ctor is overloaded crashes in
clang::Sema::ActOnExplicitInstantiation >
clang::Sema::getMoreSpecializedTemplate with attached backtrace, while instead
it should reject due to ambiguous extern template (is there even a way to
disambiguate, or is that a langauge issue?).

This is the case in at least clang 3.5.1 to 3.9.1.

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/20170321/cee05706/attachment.html>

More information about the llvm-bugs mailing list