[LLVMbugs] [Bug 20759] New: bad note location in double explicit instantiation diagnostic if the template is also implicitly specialized

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Aug 26 19:13:43 PDT 2014


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

            Bug ID: 20759
           Summary: bad note location in double explicit instantiation
                    diagnostic if the template is also implicitly
                    specialized
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

For example:

template <typename T> void f() {}
void foo() { f<int>(); }
template void f<int>();
template void f<int>();

/tmp/b.cc:4:15: error: duplicate explicit instantiation of 'f<int>'
template void f<int>();
              ^
/tmp/b.cc:2:14: note: previous explicit instantiation is here
void foo() { f<int>(); }
             ^

Or:

template <typename T> struct S {};
void foo(S<int>) {}
template struct S<int>;
template struct S<int>;

/tmp/b.cc:4:17: error: duplicate explicit instantiation of 'S<int>'
template struct S<int>;
                ^
/tmp/b.cc:2:16: note: previous explicit instantiation is here
void foo(S<int>) {}
               ^

-- 
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/20140827/a5022d38/attachment.html>


More information about the llvm-bugs mailing list