Address review comments for r167358: explicitly check for CK_BitCast instead of

checking against a blacklist.

llvm-svn: 167362
This commit is contained in:
Dmitri Gribenko 2012-11-03 22:10:18 +00:00
parent 6292e5b8e5
commit f21203b17c
1 changed files with 1 additions and 2 deletions

View File

@ -6190,8 +6190,7 @@ void Sema::CheckArgumentWithTypeTag(const ArgumentWithTypeTagAttr *Attr,
// Skip implicit cast of pointer to `void *' (as a function argument).
if (const ImplicitCastExpr *ICE = dyn_cast<ImplicitCastExpr>(ArgumentExpr))
if (ICE->getType()->isVoidPointerType() &&
ICE->getCastKind() != CK_NullToPointer &&
ICE->getCastKind() != CK_NullToMemberPointer)
ICE->getCastKind() == CK_BitCast)
ArgumentExpr = ICE->getSubExpr();
}
QualType ArgumentType = ArgumentExpr->getType();