[cfe-commits] r67952 - in /cfe/trunk: include/clang/Parse/ lib/Parse/ lib/Sema/ tools/clang-cc/

Sebastian Redl sebastian.redl at getdesigned.at
Sat Mar 28 16:18:58 PDT 2009


Chris Lattner wrote:
> Author: lattner
> Date: Sat Mar 28 14:18:32 2009
> New Revision: 67952
>
> URL: http://llvm.org/viewvc/llvm-project?rev=67952&view=rev
> Log:
> Introduce a new OpaquePtr<N> struct type, which is a simple POD wrapper for a
> pointer.  Its purpose in life is to be a glorified void*, but which does not
> implicitly convert to void* or other OpaquePtr's with a different UID.
>
> Introduce Action::DeclPtrTy which is a typedef for OpaquePtr<0>.  Change the 
> entire parser/sema interface to use DeclPtrTy instead of DeclTy*.  This
> makes the C++ compiler enforce that these aren't convertible to other opaque
> types.
>
> We should also convert ExprTy, StmtTy, TypeTy, AttrTy, BaseTy, etc,
> but I don't plan to do that in the short term.
>   

ExprTy, StmtTy and TemplateParamTy are already (slowly) converted to
ASTOwningPtr, which is also typesafe.

Sebastian



More information about the cfe-commits mailing list