miyuki added inline comments.
================ Comment at: lib/Sema/SemaTemplate.cpp:7021 + // C++ [temp]p6: + // A template, a template explicit specialization, and a class template + // partial specialization shall not have C linkage. ---------------- rogfer01 wrote: > Can you add a test for a partial specialization? Your test for the class case > only includes an explicit specialization. > > ```lang=cpp > template <typename T> > struct A { }; > > extern "C" { > > template <typename T> // I'd expect a diagnostic around here > struct A<T*> > { > }; > > } > ``` Currently the location used for template specialization-related diagnostics is on the next line, e.g.: ``` /work/llvm/src/tools/clang/test/SemaTemplate/class-template-spec.cpp:242:10: error: templates must have C++ linkage struct C<T*> {}; ^ ``` Do we want to use a different location for this particular diagnostic? https://reviews.llvm.org/D41179 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits