[cfe-dev] SourceRange for QualifiedTypeLoc
Abramo Bagnara
abramo.bagnara at gmail.com
Fri May 21 14:21:38 PDT 2010
Il 21/05/2010 19:29, John McCall ha scritto:
>
>> I've attached the patch to fix typeloc sourcerange for review/approval.
>> <TypeLocRange.patch>
>
> 1. These are really too large to be in TypeLoc.h; please move them to
> TypeLoc.cpp.
>
> 2. DependentNameTypeLoc does not have an inner type and therefore does not
> need this logic.
Commited with your suggestions in r104382.
> As a side note, even if we added source locations to QualifiedTypeLoc they would
> not be reliably ordered w.r.t. the inner type; in fact, in most places they come *after*
> the inner type, not before.
Also inside, like in: unsigned const long volatile long a;
Nevertheless I guess it might be possible to return an exact source
range for a QualifiedTypeLoc using something like min(begin1, begin2),
max(end1, end2) where min and max are implemented using
SourceManager::isBeforeInTranslationUnit.
More information about the cfe-dev
mailing list