[cfe-dev] checking function preconditions with Clang Static Analyser

Andrzej Krzemienski akrzemi1 at gmail.com
Tue Jun 11 00:37:08 PDT 2013


Hi Everyone,
I wonder if it would be possible to have Clang Static Analyser check if
function's preconditions are satisfied before the call. A precondition is
an expression, and static analyser would have to check if the same (or
similar) expression has been explicitly checked by the programmer or is
guaranteed by other function's postcondition. An example of what I mean is
provided in the following post from group ISO C++ Standard - Future
Proposals<https://groups.google.com/a/isocpp.org/forum/?fromgroups#%21forum/std-proposals>
:
https://groups.google.com/a/isocpp.org/d/msg/std-proposals/hUeCh-QCj0Y/aqX9W4ngjq0J

I am trying to determine if the addition of Contract Programming features
to C++ is enough to enable such enhanced static analysis, or if it would be
just a "dead" feature.

Regards,
&rzej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130611/ee4cc5f3/attachment.html>


More information about the cfe-dev mailing list