summaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/MemRegion.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-01-18 16:23:48 +0000
commit06d4ba388873e6d1cfa9cd715a8935ecc8cd2097 (patch)
tree3eb853da77d46cc77c4b017525a422f9ddb1385b /lib/StaticAnalyzer/Core/MemRegion.cpp
parent30d791273d07fac9c0c1641a0731191bca6e8606 (diff)
Notes
Diffstat (limited to 'lib/StaticAnalyzer/Core/MemRegion.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/MemRegion.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/StaticAnalyzer/Core/MemRegion.cpp b/lib/StaticAnalyzer/Core/MemRegion.cpp
index 22711f54239ae..76cead6232989 100644
--- a/lib/StaticAnalyzer/Core/MemRegion.cpp
+++ b/lib/StaticAnalyzer/Core/MemRegion.cpp
@@ -1116,17 +1116,6 @@ const SymbolicRegion *MemRegion::getSymbolicBase() const {
return nullptr;
}
-// FIXME: Merge with the implementation of the same method in Store.cpp
-static bool IsCompleteType(ASTContext &Ctx, QualType Ty) {
- if (const RecordType *RT = Ty->getAs<RecordType>()) {
- const RecordDecl *D = RT->getDecl();
- if (!D->getDefinition())
- return false;
- }
-
- return true;
-}
-
RegionRawOffset ElementRegion::getAsArrayOffset() const {
CharUnits offset = CharUnits::Zero();
const ElementRegion *ER = this;
@@ -1148,7 +1137,7 @@ RegionRawOffset ElementRegion::getAsArrayOffset() const {
QualType elemType = ER->getElementType();
// If we are pointing to an incomplete type, go no further.
- if (!IsCompleteType(C, elemType)) {
+ if (elemType->isIncompleteType()) {
superR = ER;
break;
}
@@ -1288,7 +1277,7 @@ RegionOffset MemRegion::getAsOffset() const {
R = ER->getSuperRegion();
QualType EleTy = ER->getValueType();
- if (!IsCompleteType(getContext(), EleTy)) {
+ if (EleTy->isIncompleteType()) {
// We cannot compute the offset of the base class.
SymbolicOffsetBase = R;
continue;