aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ValueManager.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-18 06:27:01 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-18 06:27:01 +0000
commit675bef616e51b502819fd4586ab297b58e04280f (patch)
tree555a91dd8852a0295e9476b4449cb49ce3b5c063 /lib/Analysis/ValueManager.cpp
parent386af0a224d8943f0c818d66fabc56642a458c8c (diff)
Return CodeTextRegions for BlockPointerTypes in addition to FunctionPointerTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ValueManager.cpp')
-rw-r--r--lib/Analysis/ValueManager.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Analysis/ValueManager.cpp b/lib/Analysis/ValueManager.cpp
index 62d8b0093b..658dfa1186 100644
--- a/lib/Analysis/ValueManager.cpp
+++ b/lib/Analysis/ValueManager.cpp
@@ -73,9 +73,9 @@ SVal ValueManager::getRegionValueSymbolVal(const MemRegion* R, QualType T) {
if (T.isNull())
T = TR->getValueType(SymMgr.getContext());
- // If T is of function pointer type, create a CodeTextRegion wrapping a
- // symbol.
- if (T->isFunctionPointerType()) {
+ // If T is of function pointer type or a block pointer type, create a
+ // CodeTextRegion wrapping that symbol.
+ if (T->isFunctionPointerType() || T->isBlockPointerType()) {
return loc::MemRegionVal(MemMgr.getCodeTextRegion(sym, T));
}
@@ -94,9 +94,9 @@ SVal ValueManager::getConjuredSymbolVal(const Expr* E, unsigned Count) {
QualType T = E->getType();
SymbolRef sym = SymMgr.getConjuredSymbol(E, Count);
- // If T is of function pointer type, create a CodeTextRegion wrapping a
- // symbol.
- if (T->isFunctionPointerType()) {
+ // If T is of function pointer type or a block pointer type, create a
+ // CodeTextRegion wrapping a symbol.
+ if (T->isFunctionPointerType() || T->isBlockPointerType()) {
return loc::MemRegionVal(MemMgr.getCodeTextRegion(sym, T));
}
@@ -114,9 +114,9 @@ SVal ValueManager::getConjuredSymbolVal(const Expr* E, QualType T,
SymbolRef sym = SymMgr.getConjuredSymbol(E, T, Count);
- // If T is of function pointer type, create a CodeTextRegion wrapping a
- // symbol.
- if (T->isFunctionPointerType()) {
+ // If T is of function pointer type or a block pointer type, create a
+ // CodeTextRegion wrapping a symbol.
+ if (T->isFunctionPointerType() || T->isBlockPointerType()) {
return loc::MemRegionVal(MemMgr.getCodeTextRegion(sym, T));
}