Added transfer function support for casting to "void".
llvm-svn: 47333
diff --git a/clang/Analysis/ValueState.cpp b/clang/Analysis/ValueState.cpp
index 9638646..5796238 100644
--- a/clang/Analysis/ValueState.cpp
+++ b/clang/Analysis/ValueState.cpp
@@ -252,6 +252,10 @@
case Stmt::ImplicitCastExprClass: {
ImplicitCastExpr* C = cast<ImplicitCastExpr>(E);
QualType CT = C->getType();
+
+ if (CT->isVoidType())
+ return UnknownVal();
+
QualType ST = C->getSubExpr()->getType();
if (CT == ST || (CT->isPointerType() && ST->isFunctionType())) {
@@ -266,6 +270,9 @@
QualType CT = C->getType();
QualType ST = C->getSubExpr()->getType();
+ if (CT->isVoidType())
+ return UnknownVal();
+
if (CT == ST || (CT->isPointerType() && ST->isFunctionType())) {
E = C->getSubExpr();
continue;