Use C++'s standardized [[noreturn]] attribute
authorYedidya Feldblum <yfeldblum@fb.com>
Wed, 23 Mar 2016 19:19:45 +0000 (12:19 -0700)
committerFacebook Github Bot 2 <facebook-github-bot-2-bot@fb.com>
Wed, 23 Mar 2016 19:20:24 +0000 (12:20 -0700)
commit9895ee085d445ae3ae6becdddfb9c8f9d8f6c1f5
tree2873e4ba98edf26f287b9afc96f00286f3afdcd1
parentdec1472761d208dd236d547777cba59ec27bdde0
Use C++'s standardized [[noreturn]] attribute

Summary:Use C++'s standardized `[[noreturn]]` attribute.

All supported compilers (and some unsupported compilers) also support the standardized syntax.

GCC >= 4.8, Clang >= 3.0, and MSVC >= 2015 have direct support for the C++'s standardized way of writing the attribute.

Clang - http://goo.gl/ftJGVM
GCC 4.8.2 - http://goo.gl/ORCVOD
ICC 13.0.1 - http://goo.gl/I5tn5I
MSVC 2015 - https://msdn.microsoft.com/en-us/library/hh567368.aspx

(Regardling Clang, earlier versions may support it. 3.0 was the earliest Clang version listed at godbolt.com, so that's as far back as I went.)

Therefore, we no longer need to use the compiler-specific syntaxes, or use preprocessor macros with per-compiler definitions:

    __attribute__((__noreturn__))
    __attribute__((noreturn))
    __declspec(noreturn)

Reviewed By: Orvid

Differential Revision: D3073621

fb-gh-sync-id: 32d4771d1bf1974693b8574fa2d39c9559872945
shipit-source-id: 32d4771d1bf1974693b8574fa2d39c9559872945
folly/Exception.h
folly/FormatArg.h
folly/Indestructible.h
folly/Portability.h
folly/SafeAssert.h
folly/Subprocess.cpp
folly/detail/FunctionalExcept.h
folly/experimental/bser/Load.cpp
folly/experimental/exception_tracer/ExceptionTracerLib.cpp
folly/experimental/io/HugePageUtil.cpp
folly/experimental/test/NestedCommandLineAppExample.cpp