]> granicus.if.org Git - clang/commitdiff
[analyzer] Document existence of ConstPointerEscape.
authorAnna Zaks <ganna@apple.com>
Thu, 28 Mar 2013 23:15:32 +0000 (23:15 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 28 Mar 2013 23:15:32 +0000 (23:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178311 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp

index ed89788e90ea9d691fa215709bdd98c65e0a140b..a9dd19a395c560e6b7b24ec5c08bad538d6fe01e 100644 (file)
@@ -52,6 +52,7 @@ class CheckerDocumentation : public Checker< check::PreStmt<ReturnStmt>,
                                        check::LiveSymbols,
                                        check::RegionChanges,
                                        check::PointerEscape,
+                                       check::ConstPointerEscape,
                                        check::Event<ImplicitNullDerefEvent>,
                                        check::ASTDecl<FunctionDecl> > {
 public:
@@ -274,6 +275,17 @@ public:
     return State;
   }
 
+  /// \brief Called when const pointers escape.
+  ///
+  /// Note: in most cases checkPointerEscape callback is sufficient.
+  /// \sa checkPointerEscape
+  ProgramStateRef checkConstPointerEscape(ProgramStateRef State,
+                                     const InvalidatedSymbols &Escaped,
+                                     const CallEvent *Call,
+                                     PointerEscapeKind Kind) const {
+    return State;
+  }
+                                         
   /// check::Event<ImplicitNullDerefEvent>
   void checkEvent(ImplicitNullDerefEvent Event) const {}