From f21203b17c62034eaec14ef0ac68f7009bfb9a93 Mon Sep 17 00:00:00 2001 From: Dmitri Gribenko Date: Sat, 3 Nov 2012 22:10:18 +0000 Subject: [PATCH] Address review comments for r167358: explicitly check for CK_BitCast instead of checking against a blacklist. llvm-svn: 167362 --- clang/lib/Sema/SemaChecking.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index 4a5e8e0..a434425 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/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(); -- 2.7.4