aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-10-04 18:34:40 +0000
committerAnna Zaks <ganna@apple.com>2011-10-04 18:34:40 +0000
commit8ba721428af297e540fb40b176eeeea0ee010c1f (patch)
treec1dbc8630c111fc500746cafae871503fefd93d8
parent06d92bf8a294412340b94e0f4c1b4b78b2651824 (diff)
[analyzer] Remove unused methods, add comments to others.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141098 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h24
-rw-r--r--lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp2
2 files changed, 8 insertions, 18 deletions
diff --git a/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h b/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
index cdd72880a4..db9c6c5ca2 100644
--- a/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
+++ b/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
@@ -107,6 +107,8 @@ public:
return Eng.isObjCGCEnabled();
}
+ /// \brief Generate a default checker node (containing checker tag but no
+ /// checker state changes).
ExplodedNode *generateNode(bool autoTransition = true) {
assert(statement && "Only transitions with statements currently supported");
ExplodedNode *N = generateNodeImpl(statement, getState(), false,
@@ -116,18 +118,8 @@ public:
return N;
}
- ExplodedNode *generateNode(const Stmt *stmt,
- const ProgramState *state,
- bool autoTransition = true,
- const ProgramPointTag *tag = 0) {
- assert(state);
- ExplodedNode *N = generateNodeImpl(stmt, state, false,
- tag ? tag : checkerTag);
- if (N && autoTransition)
- addTransition(N);
- return N;
- }
-
+ /// \brief Generate a new checker node with the given predecessor.
+ /// Allows checkers to generate a chain of nodes.
ExplodedNode *generateNode(const ProgramState *state,
ExplodedNode *pred,
bool autoTransition = true) {
@@ -138,6 +130,7 @@ public:
return N;
}
+ /// \brief Generate a new checker node.
ExplodedNode *generateNode(const ProgramState *state,
bool autoTransition = true,
const ProgramPointTag *tag = 0) {
@@ -149,11 +142,8 @@ public:
return N;
}
- ExplodedNode *generateSink(const Stmt *stmt, const ProgramState *state = 0) {
- return generateNodeImpl(stmt, state ? state : getState(), true,
- checkerTag);
- }
-
+ /// \brief Generate a sink node. Generating sink stops exploration of the
+ /// given path.
ExplodedNode *generateSink(const ProgramState *state = 0) {
assert(statement && "Only transitions with statements currently supported");
return generateNodeImpl(statement, state ? state : getState(), true,
diff --git a/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp b/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
index 2602fac833..81f1924b2c 100644
--- a/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp
@@ -77,7 +77,7 @@ void NoReturnFunctionChecker::checkPostStmt(const CallExpr *CE,
}
if (BuildSinks)
- C.generateSink(CE);
+ C.generateSink();
}
static bool END_WITH_NULL isMultiArgSelector(const Selector *Sel, ...) {