[cfe-commits] r159867 - /cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h

Jordan Rose jordan_rose at apple.com
Fri Jul 6 15:00:02 PDT 2012


Author: jrose
Date: Fri Jul  6 17:00:01 2012
New Revision: 159867

URL: http://llvm.org/viewvc/llvm-project?rev=159867&view=rev
Log:
[analyzer] Add comments to Calls.h.

No functionality change.

Modified:
    cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h

Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h?rev=159867&r1=159866&r2=159867&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/Calls.h Fri Jul  6 17:00:01 2012
@@ -366,6 +366,9 @@
   }
 };
 
+/// \brief Represents the memory allocation call in a C++ new-expression.
+///
+/// This is a call to "operator new".
 class CXXAllocatorCall : public AnyFunctionCall {
   const CXXNewExpr *E;
 
@@ -425,12 +428,22 @@
 
   const ObjCMessageExpr *getOriginExpr() const { return Msg; }
 
+  /// \brief Returns the value of the receiver at the time of this call.
   SVal getReceiverSVal() const;
 
+  /// \brief Returns the expression for the receiver of this message if it is
+  /// an instance message.
+  ///
+  /// Returns NULL otherwise.
+  /// \sa ObjCMessageExpr::getInstanceReceiver()
   const Expr *getInstanceReceiverExpr() const {
     return Msg->getInstanceReceiver();
   }
 
+  /// \brief Get the interface for the receiver.
+  ///
+  /// This works whether this is an instance message or a class message.
+  /// However, it currently just uses the static type of the receiver.
   const ObjCInterfaceDecl *getReceiverInterface() const {
     return Msg->getReceiverInterface();
   }
@@ -483,6 +496,10 @@
     return EntireRange;
   }
 
+  /// \brief Return the property reference part of this access.
+  ///
+  /// In the expression "obj.prop += 1", the property reference expression is
+  /// "obj.prop".
   const ObjCPropertyRefExpr *getPropertyExpr() const {
     return PropE;
   }





More information about the cfe-commits mailing list