[cfe-commits] [patch] Fix "note" of a duplicate explicit instantiation definition following a specialization
Nico Weber
thakis at chromium.org
Fri Dec 23 15:13:54 PST 2011
Hi,
the attached patch fixes the note printed in the error message in
namespace SII_WithDefinedTemplate {
template <typename STRING_TYPE> class BasicStringPiece {};
template <> class BasicStringPiece<int> { };
template class BasicStringPiece<int>; // expected-note {{previous
explicit instantiation is here}}
template class BasicStringPiece<int>; // expected-error
{{duplicate explicit instantiation of 'BasicStringPiece<int>'}}
}
Without this, clang says "Note: Previous explicit instantiation is
here" and nothing after that.
(It's a bit weird that this is an error given that the first explicit
instantiation definition counts as a no-op, but that matches existing
behavior.)
Nico
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang-sii-diag.patch
Type: application/octet-stream
Size: 3703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20111223/a2f87968/attachment.obj>
More information about the cfe-commits
mailing list