aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CastToStructChecker.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-11-11 06:43:42 +0000
committerTed Kremenek <kremenek@apple.com>2009-11-11 06:43:42 +0000
commitde7d8007567374654aa146569de98cd7423dc57b (patch)
treec82a02158b139e0bb71befee555fa06af2b38f38 /lib/Analysis/CastToStructChecker.cpp
parent1d9cbeb76cf4c36acf5545028e2b2ac207086442 (diff)
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CastToStructChecker.cpp')
-rw-r--r--lib/Analysis/CastToStructChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/CastToStructChecker.cpp b/lib/Analysis/CastToStructChecker.cpp
index 5d0110e4eb..bda8ff47bf 100644
--- a/lib/Analysis/CastToStructChecker.cpp
+++ b/lib/Analysis/CastToStructChecker.cpp
@@ -50,7 +50,7 @@ void CastToStructChecker::PreVisitCastExpr(CheckerContext &C,
QualType OrigPointeeTy = OrigPTy->getPointeeType();
QualType ToPointeeTy = ToPTy->getPointeeType();
- if (!ToPointeeTy->isRecordType())
+ if (!ToPointeeTy->isStructureType())
return;
// We allow cast from void*.