[cfe-commits] r89651 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaTemplate.cpp test/SemaTemplate/temp_explicit.cpp
Douglas Gregor
dgregor at apple.com
Thu Dec 3 09:18:26 PST 2009
On Nov 30, 2009, at 8:12 AM, Daniel Dunbar wrote:
> Hi Doug,
>
> On Mon, Nov 23, 2009 at 4:11 AM, Douglas Gregor <dgregor at apple.com> wrote:
>> Author: dgregor
>> Date: Mon Nov 23 06:11:45 2009
>> New Revision: 89651
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=89651&view=rev
>> Log:
>> Tolerate extraneous "template<>" headers better, downgrading the
>> complaint to a warning and providing a helpful node in the case where
>> the "template<>" header is redundant because the corresponding
>> template-id refers to an explicit specialization. C++0x might still
>> change this behavior, and existing practice is all over the place on
>> the number of "template<>" headers actually needed.
>
> Maybe my C++ foo is just laughable, but I read this:
>
>> +template <>
>> +struct Foo<int> // expected-note{{header not required for explicitly-specialized}}
>> +{
>
> and think "what header". That caret makes it clearer but is there a
> better wording?
That's only part of the diagnostic. The full diagnostic is:
test/SemaTemplate/temp_explicit.cpp:117:8: note: 'template<>' header not
required for explicitly-specialized class 'Foo<int>' declared here
struct Foo<int> // expected-note{{header not required for ...
^
Do you still find that confusing?
- Doug
More information about the cfe-commits
mailing list