Suppress clang memcpy warnings
authorNicholas Ormrod <njormrod@fb.com>
Fri, 12 Jun 2015 17:49:08 +0000 (10:49 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 12 Jun 2015 20:18:16 +0000 (13:18 -0700)
commit3bb128276a7edeae46d14f4a345298c3a1e983ba
treebaa6fe3d0120944b666d11a18f844565cd386c11
parent193eb597fb6e9cd1bea0269ab04ca30750183785
Suppress clang memcpy warnings

Summary: Clang warns when types with vtables are memcpy'd. If the type
has declared itself to be relocatable, then this is the desired
behavior. If the type has not declared itself to be relocatable, then
the memcpy codepath is dead. However, the dead codepath is still
instantiated (it's inside an if block with a static check, but c++
doesn't have static-if), so the compiler spits out a nasty warning
anyways.

Each memcpy reference inside of fbvector has been void-ified. I have
looked at all the codepaths leading to the memcpys, and see that they
have isRelocatable or isTriviallyCopyable checks.

Reviewed By: @markisaa

Differential Revision: D2148286
folly/FBVector.h