On Sat, Dec 24, 2011 at 12:13 AM, Nico Weber <[email protected]> wrote:
> 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.)


> +/// \brief Compute the diagnostic location for an explicit instantiation
> +//  declaration or definition.

Another slash here?

> +static SourceLocation DiagLocForExplicitInstantiation(
> +    NamedDecl* Decl, SourceLocation PointOfInstantiation) {

The star goes on the parameter name.

Thanks,
Hans

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to