Clang static analysis results for dmd

Robert Clipsham robert at octarineparrot.com
Sun Jul 24 15:11:53 PDT 2011


On 24/07/2011 22:59, Walter Bright wrote:
> On 7/24/2011 2:43 PM, Robert Clipsham wrote:
>> That's true for quite a few of the null pointer dereferences, there
>> are some
>> where there are no assertions though. It might be worth reporting
>> these false
>> positives to the folk working on it. In the other categories there are
>> far fewer
>> where they're false positives due to the assertion. It tends to be the
>> ones with
>> shorter path lengths that exhibit this problem.
>
> dmd uses its own definition of assert(). It is marked as:
>
> #pragma noreturn(util_assert)
>
> in tassert.h.
>
> If there is an equivalent for clang, I suggest adding that in and
> rerunning the analysis. Getting rid of hundreds of false positives will
> save a lot of time.

http://clang.llvm.org/docs/LanguageExtensions.html#__builtin_unreachable

If you'd do the honours of adding this in I'll rerun the analysis next 
time I get a chance.

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d mailing list