Open
Description
Bugzilla Link | 13858 |
Version | trunk |
OS | All |
Reporter | LLVM Bugzilla Contributor |
Extended Description
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.