diff options
| author | Ted Kremenek <kremenek@apple.com> | 2008-11-12 21:58:46 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2008-11-12 21:58:46 +0000 |
| commit | 65dd30fdea33d0179d40b66c8e00d12db03e1c6a (patch) | |
| tree | 72b39ff30b68b031cacf511d7b9e829cc0cd8fb8 /clang/lib/Analysis | |
| parent | a461e6d124d493caa9e8ee491d7ae40286bd05ea (diff) | |
| download | llvm-65dd30fdea33d0179d40b66c8e00d12db03e1c6a.zip llvm-65dd30fdea33d0179d40b66c8e00d12db03e1c6a.tar.gz llvm-65dd30fdea33d0179d40b66c8e00d12db03e1c6a.tar.bz2 | |
Update CFGStmtVisitor to recognize that ObjCForCollectionStmts are special block-level "expressions".
llvm-svn: 59176
Diffstat (limited to 'clang/lib/Analysis')
| -rw-r--r-- | clang/lib/Analysis/LiveVariables.cpp | 6 | ||||
| -rw-r--r-- | clang/lib/Analysis/UninitializedValues.cpp | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index 9bbbf55..4432ac0 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/lib/Analysis/LiveVariables.cpp @@ -121,7 +121,7 @@ public: void VisitBinaryOperator(BinaryOperator* B); void VisitAssign(BinaryOperator* B); void VisitDeclStmt(DeclStmt* DS); - void VisitObjCForCollectionStmt(ObjCForCollectionStmt* S); + void BlockStmt_VisitObjCForCollectionStmt(ObjCForCollectionStmt* S); void VisitUnaryOperator(UnaryOperator* U); void Visit(Stmt *S); void VisitTerminator(CFGBlock* B); @@ -176,7 +176,9 @@ void TransferFuncs::VisitBinaryOperator(BinaryOperator* B) { else VisitStmt(B); } -void TransferFuncs::VisitObjCForCollectionStmt(ObjCForCollectionStmt* S) { +void +TransferFuncs::BlockStmt_VisitObjCForCollectionStmt(ObjCForCollectionStmt* S) { + // This represents a 'use' of the collection. Visit(S->getCollection()); diff --git a/clang/lib/Analysis/UninitializedValues.cpp b/clang/lib/Analysis/UninitializedValues.cpp index 3a84b28..0e4a387 100644 --- a/clang/lib/Analysis/UninitializedValues.cpp +++ b/clang/lib/Analysis/UninitializedValues.cpp @@ -75,7 +75,7 @@ public: bool VisitCallExpr(CallExpr* C); bool VisitDeclStmt(DeclStmt* D); bool VisitConditionalOperator(ConditionalOperator* C); - bool VisitObjCForCollectionStmt(ObjCForCollectionStmt* S); + bool BlockStmt_VisitObjCForCollectionStmt(ObjCForCollectionStmt* S); bool Visit(Stmt *S); bool BlockStmt_VisitExpr(Expr* E); @@ -180,7 +180,8 @@ bool TransferFuncs::VisitUnaryOperator(UnaryOperator* U) { return Visit(U->getSubExpr()); } -bool TransferFuncs::VisitObjCForCollectionStmt(ObjCForCollectionStmt* S) { +bool +TransferFuncs::BlockStmt_VisitObjCForCollectionStmt(ObjCForCollectionStmt* S) { // This represents a use of the 'collection' bool x = Visit(S->getCollection()); |
