diff options
| author | Ted Kremenek <kremenek@apple.com> | 2007-11-20 03:01:58 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2007-11-20 03:01:58 +0000 |
| commit | 9d0acca967280ebb7d356e7419906b5ada5d246a (patch) | |
| tree | 6dfd14384cf0e46ea46d73aed973e1f73ac44b3d /clang/Analysis/UninitializedValues.cpp | |
| parent | 6edac0ad1da2a17900f24aaed320e6b3d504fb01 (diff) | |
| download | bcm5719-llvm-9d0acca967280ebb7d356e7419906b5ada5d246a.tar.gz bcm5719-llvm-9d0acca967280ebb7d356e7419906b5ada5d246a.zip | |
Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion of
"block-expressions" when visiting arbitrary expressions (via calls to
"Visit()"). This results in a refactoring where a dataflow analysis no
longer needs to always special case when handling block-expressions versus
non-block expressions.
Updated LiveVariables and UninitializedValues to conform to the slightly
altered interface of these visitor classes.
Thanks to Nuno Lopes for providing a test case that illustrated some
fundamental problems in the current design of the CFGXXXStmtVisitor classes
and how they were used.
llvm-svn: 44246
Diffstat (limited to 'clang/Analysis/UninitializedValues.cpp')
| -rw-r--r-- | clang/Analysis/UninitializedValues.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/Analysis/UninitializedValues.cpp b/clang/Analysis/UninitializedValues.cpp index 6f24872cd23..0a496595f63 100644 --- a/clang/Analysis/UninitializedValues.cpp +++ b/clang/Analysis/UninitializedValues.cpp @@ -34,6 +34,7 @@ public: RegisterDecls(UninitializedValues::AnalysisDataTy& ad) : AD(ad) {} void VisitBlockVarDecl(BlockVarDecl* VD) { AD.Register(VD); } + CFG& getCFG() { return AD.getCFG(); } }; } // end anonymous namespace @@ -58,6 +59,7 @@ public: } UninitializedValues::ValTy& getVal() { return V; } + CFG& getCFG() { return AD.getCFG(); } bool VisitDeclRefExpr(DeclRefExpr* DR); bool VisitBinaryOperator(BinaryOperator* B); |

