[cfe-dev] Q_ASSERT and Clang static analyzer

Dmitri Gribenko gribozavr at gmail.com
Tue Aug 20 09:59:31 PDT 2013


On Tue, Aug 20, 2013 at 9:50 AM, Stephen Kelly <steveire at gmail.com> wrote:
> Jordan Rose wrote:
>> Obviously, the best case is to get them to start using
>> __attribute__((noreturn)) and/or __attribute__((analyzer_noreturn)). I can
>> see adding qtFatal to the list, though, since Qt is a fairly widespread
>> toolkit.
>
> qt_assert is already __attribute__((noreturn)).
>
>  #ifndef Q_CC_MSVC
>  Q_NORETURN
>  #endif
>  Q_CORE_EXPORT void qt_assert(const char *assertion, const char *file, int
> line) Q_DECL_NOTHROW;

That's true.  I missed the Q_NORETURN because it is on a separate
line.  Sorry for the noise -- I will investigate more then.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/



More information about the cfe-dev mailing list