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

John McCall rjmccall at apple.com
Mon Oct 17 16:25:22 PDT 2011


On Oct 17, 2011, at 11:49 AM, Sebastian Redl wrote:
> 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.

Yes, it should;  I'll fix that.

John.



More information about the cfe-commits mailing list