aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Checker
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2010-09-16 01:25:47 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2010-09-16 01:25:47 +0000
commitb36cd3e1757fb4fcd9509f35558c847b04bef35f (patch)
treebd1aa08c903a1b5007a6dfd2c892617d20c45b47 /include/clang/Checker
parent6dbcaf3849709e271ffad5974150a6adbbfbb064 (diff)
Introduce new CFGElement hierarchy to support C++ CFG, based on Marcin's patch
and discussions with Ted and Jordy. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114056 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Checker')
-rw-r--r--include/clang/Checker/PathSensitive/GRCoreEngine.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/clang/Checker/PathSensitive/GRCoreEngine.h b/include/clang/Checker/PathSensitive/GRCoreEngine.h
index bba59f587e..5a5b7f22de 100644
--- a/include/clang/Checker/PathSensitive/GRCoreEngine.h
+++ b/include/clang/Checker/PathSensitive/GRCoreEngine.h
@@ -259,7 +259,13 @@ public:
/// getStmt - Return the current block-level expression associated with
/// this builder.
- const Stmt* getStmt() const { return B[Idx]; }
+ const Stmt* getStmt() const {
+ CFGStmt CS = B[Idx].getAs<CFGStmt>();
+ if (CS)
+ return CS.getStmt();
+ else
+ return 0;
+ }
/// getBlock - Return the CFGBlock associated with the block-level expression
/// of this builder.