================
@@ -163,6 +163,42 @@ the use of preprocessor macros.
 
   void my_assert_rtn(const char *, const char *, int, const char *) 
CLANG_ANALYZER_NORETURN;
 
+Dynamic Memory Modeling Annotations
+###################################
+
+If a project uses custom functions for dynamic memory management (that e.g. 
act as wrappers around ``malloc``/``free`` or ``new``/``delete`` in C++) and 
the analyzer cannot "see" the _definitions_ of these functions, it's possible 
to annotate their declarations to let the analyzer model their behavior. 
(Otherwise the analyzer cannot know that the opaque ``my_free()`` is basically 
equivalent to a standard ``free()`` call.)
+
+**This page only provides a brief list of these annotations.** For a full 
documentation, see the main `Attributes in Clang 
<../../AttributeReference.html#ownership-holds-ownership-returns-ownership-takes-clang-static-analyzer>`_
 page.
----------------
NagyDonat wrote:

Thanks for the suggestion, I did not know about this feature.

https://github.com/llvm/llvm-project/pull/122749
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to