summaryrefslogtreecommitdiffstats
path: root/clang/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
commit2c8a159b7d4ded1f124c9002f03f310cdb011ebd (patch)
tree1df2ec2680c566d3d88997646857c36c2db412da /clang/lib/Analysis/ValueManager.cpp
parent38e46c46b488171fc8c00800ef7326e96348cea1 (diff)
downloadbcm5719-llvm-2c8a159b7d4ded1f124c9002f03f310cdb011ebd.tar.gz
bcm5719-llvm-2c8a159b7d4ded1f124c9002f03f310cdb011ebd.zip
Return CodeTextRegions for BlockPointerTypes in addition to FunctionPointerTypes.
llvm-svn: 76287
Diffstat (limited to 'clang/lib/Analysis/ValueManager.cpp')
-rw-r--r--clang/lib/Analysis/ValueManager.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/clang/lib/Analysis/ValueManager.cpp b/clang/lib/Analysis/ValueManager.cpp
index 62d8b0093b2..658dfa1186c 100644
--- a/clang/lib/Analysis/ValueManager.cpp
+++ b/clang/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));
}
OpenPOWER on IntegriCloud