-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Duplicate explicit template instantiation reports incorrect source location #14230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-clang-frontend Author: None (llvmbot)
| | |
| --- | --- |
| Bugzilla Link | [13858](https://llvm.org/bz13858) |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
Extended DescriptionSometimes 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:
Expected results:
|
@llvm/issue-subscribers-c-1 Author: None (llvmbot)
| | |
| --- | --- |
| Bugzilla Link | [13858](https://llvm.org/bz13858) |
| Version | trunk |
| OS | All |
| Reporter | LLVM Bugzilla Contributor |
Extended DescriptionSometimes 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:
Expected results:
|
The diagnostic might even refer to an explicit declaration as in the following example: template <typename T>
struct S {
void f(){};
};
extern template void S<int>::f();
template struct S<int>;
template void S<int>::f(); Note the
Expected:
|
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:
Actual Results:
Expected results:
The text was updated successfully, but these errors were encountered: