[cfe-dev] Diagnostic proposal
via cfe-dev
cfe-dev at lists.llvm.org
Tue Jan 28 07:40:40 PST 2020
Hi @clang,
I have a small proposal for an improved error message. Consider
https://godbolt.org/z/j3i9jy
There the function foo for the template class is instantiated for int, because foo is virtual. A non-virtual function wouldn't get instantiated (since it is not used) and no error would be generated. Currently the diagnostic only hints to the constructor as the final instantiation context. An extended message, that the function is instantiated, because it is virtual, would be helpful.
Otherwise, with a larger c'tor and a more complex class hierarchy it is not so easy to tell, what is going on.
Best Olaf
More information about the cfe-dev
mailing list