As of yesterday, clang static-checking support has been checked into the
tree. To use it, compile with clang 3.2 (tip-of-trunk may or may not
work) and --enable-clang-plugin on a Linux machine. Mac support is
currently not enabled since I don't own a Mac and the build system for
this kind of stuff is really, really crappy. It is also not yet usable
on try for reasons to do with header incompatibilities, although this
will appear to be resolvable within a day or two if things go well.
So what does this static checking do? Currently, it only verifies the
correctness of MOZ_MUST_OVERRIDE. Details of what this does exactly may
be found in mfbt/Attributes.h, but it effectively requires all
subclasses of a class to override a given method and reports an error if
this is not the case. I plan to port the NS_STACK_CLASS of the old
dehydra interface to the new checker as well, and am considering porting
the static initializer warning as well. The other old analyses I am
planning on ditching as either superseded by other features (the
NS_FINAL/NS_OVERRIDE, now in C++11) or of arguable correctness (the
outparams analysis).
--
Joshua Cranmer
Thunderbird and DXR developer
Source code archæologist
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform