aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2012-11-03 22:10:18 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2012-11-03 22:10:18 +0000
commitb57ce4e8918656f5f4070f59d74354fcefbbb6f8 (patch)
tree38901265153d9f1d5db18e1fad01e8d92bd365f1 /lib/Sema/SemaChecking.cpp
parent9cffb4a9ae548245ede15850cb96dfedf56255fe (diff)
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
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r--lib/Sema/SemaChecking.cpp3
1 files changed, 1 insertions, 2 deletions
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<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();