From: Dmitri Gribenko Date: Sat, 3 Nov 2012 22:10:18 +0000 (+0000) Subject: Address review comments for r167358: explicitly check for CK_BitCast instead of X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b57ce4e8918656f5f4070f59d74354fcefbbb6f8;p=clang Address review comments for r167358: explicitly check for CK_BitCast instead of checking against a blacklist. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167362 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 4a5e8e05c7..a434425db8 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -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(ArgumentExpr)) if (ICE->getType()->isVoidPointerType() && - ICE->getCastKind() != CK_NullToPointer && - ICE->getCastKind() != CK_NullToMemberPointer) + ICE->getCastKind() == CK_BitCast) ArgumentExpr = ICE->getSubExpr(); } QualType ArgumentType = ArgumentExpr->getType();