[cfe-commits] r127085 - in /cfe/trunk: include/clang/AST/TypeLoc.h lib/Sema/SemaType.cpp lib/Sema/TreeTransform.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp
Abramo Bagnara
abramo.bagnara at gmail.com
Sun Mar 6 14:57:50 PST 2011
Il 06/03/2011 19:00, Douglas Gregor ha scritto:
>
> On Mar 5, 2011, at 6:42 AM, Abramo Bagnara wrote:
>
>> Author: abramo
>> Date: Sat Mar 5 08:42:21 2011
>> New Revision: 127085
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=127085&view=rev
>> Log:
>> Improved MemberPointerType source locations.
>
> Very nice. Could you add some tests, either to test/SemaCXX/nested-name-spec-locations.cpp or test/Index/annotation-nested-name-specifier.cpp, so we're sure that we don't lose this location information over time?
>
I'm sorry, I've tried but I've failed to do that: I've not seen in these
file other example of type source location check.
I've also searched for some diagnostics that uses typeloc locations, but
I've not found anything useful.
>> + assert(isa<DependentNameType>(ClsTy) && "Unexpected TypeLoc");
>> + {
>> + DependentNameTypeLoc DNTLoc = *cast<DependentNameTypeLoc>(&ClsTL);
>
> FWIW, you can just use
>
> cast<DependentNameTypeLoc>(ClsTL)
>
> here.
Fixed.
More information about the cfe-commits
mailing list