[petsc-dev] Clang Analyzer

Barry Smith bsmith at mcs.anl.gov
Sun Apr 12 19:48:47 CDT 2015


> On Apr 12, 2015, at 7:13 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> 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.

  Fine with me if you can get it to work.





More information about the petsc-dev mailing list