[cfe-commits] r142203 - in /cfe/trunk: include/clang/AST/Expr.h lib/Sema/SemaCast.cpp

Sebastian Redl sebastian.redl at getdesigned.at
Mon Oct 17 11:49:58 PDT 2011


On 17.10.2011 19:42, John McCall wrote:
> Author: rjmccall
> Date: Mon Oct 17 12:42:19 2011
> New Revision: 142203
>
> URL: http://llvm.org/viewvc/llvm-project?rev=142203&view=rev
> Log:
> Add a helper function for determining whether an expression
> has placeholder type.
>
>
> +  /// \brief Returns whether this expression has a specific placeholder type.
> +  bool hasPlaceholderType(BuiltinType::Kind K) const {
> +    if (const BuiltinType *BT = dyn_cast<BuiltinType>(getType()))
> +      return BT->getKind() == K;
> +    return false;
> +  }
Should this assert that K actually is a placeholder type? Currently the 
implementation looks like isSpecificBuiltinType.

Sebastian



More information about the cfe-commits mailing list