[cfe-commits] r167339 - /cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp

Jordan Rose jordan_rose at apple.com
Fri Nov 2 16:49:33 PDT 2012


Author: jrose
Date: Fri Nov  2 18:49:33 2012
New Revision: 167339

URL: http://llvm.org/viewvc/llvm-project?rev=167339&view=rev
Log:
[analyzer] CheckerDocumentation: Change examples for PreStmt and PostStmt.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp?rev=167339&r1=167338&r2=167339&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp Fri Nov  2 18:49:33 2012
@@ -33,8 +33,8 @@
 /// checking.
 ///
 /// \sa CheckerContext
-class CheckerDocumentation : public Checker< check::PreStmt<DeclStmt>,
-                                       check::PostStmt<CallExpr>,
+class CheckerDocumentation : public Checker< check::PreStmt<ReturnStmt>,
+                                       check::PostStmt<DeclStmt>,
                                        check::PreObjCMessage,
                                        check::PostObjCMessage,
                                        check::PreCall,
@@ -64,8 +64,8 @@
   /// See checkBranchCondition() callback for performing custom processing of
   /// the branching statements.
   ///
-  /// check::PreStmt<DeclStmt>
-  void checkPreStmt(const DeclStmt *DS, CheckerContext &C) const {}
+  /// check::PreStmt<ReturnStmt>
+  void checkPreStmt(const ReturnStmt *DS, CheckerContext &C) const {}
 
   /// \brief Post-visit the Statement.
   ///
@@ -74,8 +74,8 @@
   /// which does not include the control flow statements such as IfStmt. The
   /// callback can be specialized to be called with any subclass of Stmt.
   ///
-  /// check::PostStmt<CallExpr>
-  void checkPostStmt(const CallExpr *DS, CheckerContext &C) const;
+  /// check::PostStmt<DeclStmt>
+  void checkPostStmt(const DeclStmt *DS, CheckerContext &C) const;
 
   /// \brief Pre-visit the Objective C message.
   ///
@@ -98,8 +98,8 @@
   /// behavior for functions and methods no matter how they are being invoked.
   ///
   /// Note that this includes ALL cross-body invocations, so if you want to
-  /// limit your checks to, say, function calls, you can either test for that
-  /// or fall back to the explicit callback (i.e. check::PreStmt).
+  /// limit your checks to, say, function calls, you should test for that at the
+  /// beginning of your callback function.
   ///
   /// check::PreCall
   void checkPreCall(const CallEvent &Call, CheckerContext &C) const {}
@@ -256,7 +256,7 @@
 
 };
 
-void CheckerDocumentation::checkPostStmt(const CallExpr *DS,
+void CheckerDocumentation::checkPostStmt(const DeclStmt *DS,
                                          CheckerContext &C) const {
   return;
 }





More information about the cfe-commits mailing list