Fix invalid casts in <functional>.
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 10 Feb 2016 21:53:28 +0000 (21:53 +0000)
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>
Wed, 10 Feb 2016 21:53:28 +0000 (21:53 +0000)
commit3e58a6a7b2b6f6af9ac2b091909e829fe5a21a99
treec842cc6566821a0904ef34bba00f90c64f7386e9
parentfa61bb5be9bbfdce974c3cf2cd4686485b9abf92
Fix invalid casts in <functional>.

static_cast of a pointer to object before the start of the object's
lifetime has undefined behavior.

This code triggers CFI warnings.

This change replaces C-style casts with reinterpret_cast, which is
fine per the standard, add applies an attribute to silence CFI (which
barks on reinterpret_cast, too).

llvm-svn: 260441
libcxx/include/__config
libcxx/include/functional