> On Mar 15, 2016, at 5:53 PM, Devin Coughlin <[email protected]> wrote:
>
> You can get false positives like this if you use custom assertion macros in
> your project. In this case you would need to annotate the assertion handler
> (the part of the assertion macro that aborts when the check fails) with
> __attribute__((analyzer_noreturn)).
I use the more-standard __attribute__((noreturn)) on my assertion-failed
handlers.
I notice that the docs you linked to say "currently, clang does not support
these attributes on Objective-C methods and C++ methods” — is that still true?
I’ve got a couple of C++ methods marked as “[[noreturn]]”:
struct error : public std::exception {
...
[[noreturn]] static void _throw(fdb_status);
[[noreturn]] static void assertionFailed(const char *func, const char
*file, unsigned line,
const char *expr);
};
For Clang’s sake should I change those into regular functions? And does the
analyzer recognize C++11’s “[[noreturn]]” syntax?
—Jens _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com
This email sent to [email protected]