CastToStructChecker: use 'isStructureType()' instead of 'isRecordType()' to determine if a pointer is casted to a struct pointer. This fixes an observed false positive when a value is casted to a union.
llvm-svn: 86813
diff --git a/clang/lib/Analysis/CastToStructChecker.cpp b/clang/lib/Analysis/CastToStructChecker.cpp
index 5d0110e..bda8ff4 100644
--- a/clang/lib/Analysis/CastToStructChecker.cpp
+++ b/clang/lib/Analysis/CastToStructChecker.cpp
@@ -50,7 +50,7 @@
QualType OrigPointeeTy = OrigPTy->getPointeeType();
QualType ToPointeeTy = ToPTy->getPointeeType();
- if (!ToPointeeTy->isRecordType())
+ if (!ToPointeeTy->isStructureType())
return;
// We allow cast from void*.