[PATCH] [analyzer][Bugfix] RegionStore: use pointee type to create one-element regions
Aleksei Sidorin
a.sidorin at samsung.com
Tue Aug 19 10:50:47 PDT 2014
Hi zaks.anna, jordan_rose, krememek,
This patch fixes an issue that makes analyzer to create additional symbols for pointer variables (binding is not recognized even if it exists).
http://reviews.llvm.org/D4974
Files:
lib/StaticAnalyzer/Core/RegionStore.cpp
Index: lib/StaticAnalyzer/Core/RegionStore.cpp
===================================================================
--- lib/StaticAnalyzer/Core/RegionStore.cpp
+++ lib/StaticAnalyzer/Core/RegionStore.cpp
@@ -1282,6 +1282,8 @@
const SymbolicRegion *SR = cast<SymbolicRegion>(MR);
T = SR->getSymbol()->getType();
}
+ if (T->isAnyPointerType() || T->isReferenceType())
+ T = T->getPointeeType();
}
MR = GetElementZeroRegion(MR, T);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4974.12671.patch
Type: text/x-patch
Size: 480 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140819/e52384fa/attachment.bin>
More information about the cfe-commits
mailing list