[petsc-dev] Clang Analyzer

Jed Brown jed at jedbrown.org
Sun Apr 12 19:13:03 CDT 2015


Barry Smith <bsmith at mcs.anl.gov> writes:

>   Lisandro,
>
>    More code analysis is always good. We'll figure something out for this particular beast. Note that petscsys.h already uses #if defined(__has_attribute) so maybe we can use 
>
> #if defined(__has_attribute)
> #  if __has_attribute(analyzer_noreturn)
>
>    instead of the #ifdef __clang_analyzer__?

Should we add a PETSC_HAS_ATTRIBUTE(analyzer_noreturn) to make this less
verbose?  (It would return 0 if __has_attribute is not available.)  I
foresee more use of __has_attribute to reduce the number of tests we
have to run and make petscconf.h more robust to, e.g., minor version
changes in the compiler stack.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150412/ec675f53/attachment.sig>


More information about the petsc-dev mailing list