[cfe-dev] Incorrect source range for specialized template VarDecl declaration

Will Wilson will at indefiant.com
Wed Jan 9 08:38:05 PST 2013


I'll leave it on the back burner. At least there's a fairly easy workaround
for the time being.


On 9 January 2013 03:17, Richard Smith <richard at metafoo.co.uk> wrote:

> On Tue, Jan 8, 2013 at 4:11 PM, Will Wilson <will at indefiant.com> wrote:
> >
> >> > 1. I assume the same is true for the whole if-else block in
> >> > CheckMemberSpecialization() that applies TSK_ExplicitSpecialization
> for
> >> > various Decl types?
> >>
> >> Yes, those calls to setLocation all look wrong. Do you see any test
> >> failures if you remove them?
> >
> >
> > Failing Tests (5):
> >     Clang :: CXX/temp/temp.spec/temp.expl.spec/p2-0x.cpp
> >     Clang :: CXX/temp/temp.spec/temp.expl.spec/p2.cpp
> >     Clang :: CXX/temp/temp.spec/temp.expl.spec/p5.cpp
> >     Clang :: CXX/temp/temp.spec/temp.explicit/p4.cpp
> >     Clang :: SemaCXX/warn-unused-filescoped.cpp
> >
> > It looks like a few diagnostics rely on the location data. All of the
> fails
> > seem to be composed of the diagnostics moving from the specialization to
> the
> > declaration (from test/CXX/temp/temp.spec/temp.expl.spec/p5.cpp):
> >
> > error: 'note' diagnostics expected but not seen:
> >   Line 31: forward declaration
> > error: 'note' diagnostics seen but not expected:
> >   Line 15: forward declaration of 'X<IntHolder, long>::Inner'
> > 2 errors generated.
> >
> > Obviously the tests could be fairly easily updated but it seems there's
> more
> > than a little danger of adversely affecting utility of the diagnostics. I
> > guess the diagnostics would have to be reworked to ensure they resolved
> the
> > explicitly specialized definition rather than declaration location -
> which
> > sounds like it might be a fair bit of work...
>
> OK, that diagnostic change in particular looks bad. Seems this will
> not be straightforward to fix. :(
>



-- 
*Indefiant Ltd.*
*
*
Firsby Lodge, New Main Road, Scamblesby, Louth, Lincs LN11 9XH UK
*Tel: +44 20 8123 7663 England Registered No. 07936820 VAT No. **128556202*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130109/426f17b8/attachment.html>


More information about the cfe-dev mailing list