aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/UninitializedValues.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-08-23 23:05:04 +0000
committerTed Kremenek <kremenek@apple.com>2011-08-23 23:05:04 +0000
commitf1d10d939739f1a4544926d807e4f0f9fb64be61 (patch)
tree3bcc6c1da0d4b78889641dd0a5fea471ecbe355e /lib/Analysis/UninitializedValues.cpp
parent8ed557991fe8d51eb27e6c439030ec6ef93a2b8f (diff)
Constify the result of CFGStmt::getStmt().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/UninitializedValues.cpp')
-rw-r--r--lib/Analysis/UninitializedValues.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/UninitializedValues.cpp b/lib/Analysis/UninitializedValues.cpp
index 77da2427c0..f0debc1f3e 100644
--- a/lib/Analysis/UninitializedValues.cpp
+++ b/lib/Analysis/UninitializedValues.cpp
@@ -164,7 +164,7 @@ ValueVector &CFGBlockValues::lazyCreate(ValueVector *&bv) {
/// This function pattern matches for a '&&' or '||' that appears at
/// the beginning of a CFGBlock that also (1) has a terminator and
/// (2) has no other elements. If such an expression is found, it is returned.
-static BinaryOperator *getLogicalOperatorInChain(const CFGBlock *block) {
+static const BinaryOperator *getLogicalOperatorInChain(const CFGBlock *block) {
if (block->empty())
return 0;
@@ -172,7 +172,7 @@ static BinaryOperator *getLogicalOperatorInChain(const CFGBlock *block) {
if (!cstmt)
return 0;
- BinaryOperator *b = dyn_cast_or_null<BinaryOperator>(cstmt->getStmt());
+ const BinaryOperator *b = dyn_cast_or_null<BinaryOperator>(cstmt->getStmt());
if (!b || !b->isLogicalOp())
return 0;
@@ -653,7 +653,7 @@ static bool runOnBlock(const CFGBlock *block, const CFG &cfg,
for (CFGBlock::const_iterator I = block->begin(), E = block->end();
I != E; ++I) {
if (const CFGStmt *cs = dyn_cast<CFGStmt>(&*I)) {
- tf.Visit(cs->getStmt());
+ tf.Visit(const_cast<Stmt*>(cs->getStmt()));
}
}
tf.ProcessUses();