[cfe-commits] r64141 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Parse/DeclSpec.h lib/Parse/DeclSpec.cpp lib/Parse/ParseDecl.cpp lib/Parse/ParseExprCXX.cpp lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaType.cpp test/SemaObjC/protocol-archane.m
Douglas Gregor
dgregor at apple.com
Tue Feb 10 14:48:11 PST 2009
On Feb 10, 2009, at 2:44 PM, Chris Lattner wrote:
>
> On Feb 9, 2009, at 7:09 AM, Douglas Gregor wrote:
>
>> Author: dgregor
>> Date: Mon Feb 9 09:09:02 2009
>> New Revision: 64141
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=64141&view=rev
>> Log:
>> Make Sema::getTypeName return the opaque pointer of a QualType rather
>> than a Decl, which gives us some more flexibility to express the
>> results with the type system. There are no clients using this
>> flexibility yet, but it's meant to be able to describe qualified
>> names
>> as written in the source (e.g., "foo::type") or template-ids that
>> name
>> a class template specialization (e.g., "std::vector<INT>").
>
> Hi Doug,
>
> I'm fine with this, but what does std::vector<INT> have to do with
> QualTypes? Returning a QualType vs a Type* should just be a
> difference in CVR qualifiers?
Well, in this case it could be a Type*, since what we're referring to
won't ever have any cvr-qualifiers. However, TypeTy *'s in other
places in the compiler (say, when we parse a type-id) return
QualType's opaque pointer because they can have cvr-qualifiers.
- Doug
More information about the cfe-commits
mailing list