aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicStore.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-11-07 10:38:33 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-11-07 10:38:33 +0000
commitf22679e3e5d5f5754931952e58112b4c863a4137 (patch)
tree703bcba80843be4e5e5a31a6cebb394aead9ec38 /lib/Analysis/BasicStore.cpp
parent13d1ee2ea780c749f8c2298d253b67d50535e493 (diff)
Finish the implementation of VisitCompoundLiteralExpr. As VisitInitListExpr is
available, things get much simplified. One addition is that CompoundLiteralExpr can appear both in rvalue and lvalue context. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58837 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicStore.cpp')
-rw-r--r--lib/Analysis/BasicStore.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index de5ff30db9..be9f4fdd12 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -46,13 +46,15 @@ public:
return loc::MemRegionVal(MRMgr.getVarRegion(VD));
}
- Store BindCompoundLiteral(Store store, const CompoundLiteralRegion* R,
- const SVal* BegInit, const SVal* EndInit) {
+ Store BindCompoundLiteral(Store store, const CompoundLiteralExpr* CL,
+ SVal V) {
return store;
}
SVal getLValueVar(const GRState* St, const VarDecl* VD);
SVal getLValueString(const GRState* St, const StringLiteral* S);
+ SVal getLValueCompoundLiteral(const GRState* St,
+ const CompoundLiteralExpr* CL);
SVal getLValueIvar(const GRState* St, const ObjCIvarDecl* D, SVal Base);
SVal getLValueField(const GRState* St, SVal Base, const FieldDecl* D);
SVal getLValueElement(const GRState* St, SVal Base, SVal Offset);
@@ -99,7 +101,12 @@ SVal BasicStoreManager::getLValueString(const GRState* St,
const StringLiteral* S) {
return loc::MemRegionVal(MRMgr.getStringRegion(S));
}
-
+
+SVal BasicStoreManager::getLValueCompoundLiteral(const GRState* St,
+ const CompoundLiteralExpr* CL){
+ return loc::MemRegionVal(MRMgr.getCompoundLiteralRegion(CL));
+}
+
SVal BasicStoreManager::getLValueIvar(const GRState* St, const ObjCIvarDecl* D,
SVal Base) {
return UnknownVal();