r178311 - [analyzer] Document existence of ConstPointerEscape.

Anna Zaks ganna at apple.com
Thu Mar 28 16:15:32 PDT 2013


Author: zaks
Date: Thu Mar 28 18:15:32 2013
New Revision: 178311

URL: http://llvm.org/viewvc/llvm-project?rev=178311&view=rev
Log:
[analyzer] Document existence of ConstPointerEscape.

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=178311&r1=178310&r2=178311&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp Thu Mar 28 18:15:32 2013
@@ -52,6 +52,7 @@ class CheckerDocumentation : public Chec
                                        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 {}
 





More information about the cfe-commits mailing list