[LLVMbugs] [Bug 13858] New: Duplicate explicit template instantiation reports incorrect source location
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun Sep 16 21:15:17 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13858
Bug #: 13858
Summary: Duplicate explicit template instantiation reports
incorrect source location
Product: clang
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: abbeyj at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Sometimes the note for the "previous explicit instantiation" refers to an
implicit instantiation instead of the explicit one. For example, take this as
test.cpp:
template <typename T>
struct S {
};
void foo() {
S<int>();
}
template struct S<int>;
template struct S<int>;
Actual Results:
$ clang -c test.cpp
test.cpp:10:17: error: duplicate explicit instantiation of 'S<int>'
template struct S<int>;
^
test.cpp:6:5: note: previous explicit instantiation is here
S<int>();
^
1 error generated.
Expected results:
$ clang -c test.cpp
test.cpp:10:17: error: duplicate explicit instantiation of 'S<int>'
template struct S<int>;
^
test.cpp:9:17: note: previous explicit instantiation is here
template struct S<int>;
^
1 error generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list