]> granicus.if.org Git - clang/commitdiff
[analyzer] Remove unused methods, add comments to others.
authorAnna Zaks <ganna@apple.com>
Tue, 4 Oct 2011 18:34:40 +0000 (18:34 +0000)
committerAnna Zaks <ganna@apple.com>
Tue, 4 Oct 2011 18:34:40 +0000 (18:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141098 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
lib/StaticAnalyzer/Checkers/NoReturnFunctionChecker.cpp

index cdd72880a4187c4092ee375bbdcc35f6da9ac1c4..db9c6c5ca2bcfdc71f682557b0b3b255f2826780 100644 (file)
@@ -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,
index 2602fac833ec5c5ec6e808f1ffaac2eab37e0f88..81f1924b2c7acc46a469777c9bf0c11cbec0457c 100644 (file)
@@ -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, ...) {