Throwing an exception from the constructor of an object being used with static or thread_local storage duration is a dangerous operation. The exception thrown for an object with static storage duration cannot be caught, even by function-try-blocks in main, and the exception thrown for an object with thread_local storage duration cannot be caught by a function-try-block of the initial thread. This patch adds a checker to flag such constructs.
This check corresponds to the CERT secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/ERR58-CPP.+Constructors+of+objects+with+static+or+thread+storage+duration+must+not+throw+exceptions
Please sort includes.