Fix broken clause11_21_4_6_6 test in Apple Clang.
authorPeter Griess <pgriess@fb.com>
Wed, 16 Oct 2013 19:43:02 +0000 (14:43 -0500)
committerPeter Griess <pgriess@fb.com>
Tue, 26 Nov 2013 15:05:18 +0000 (07:05 -0800)
commit1c3d7f2a87dbac3f2a587b7c870a1b6ac78a3ced
tree814cd9479f0f1e7343e14d5dec8f7e63da2474e3
parentea10c90474c682e76c4a147d96734704462f99dc
Fix broken clause11_21_4_6_6 test in Apple Clang.

Summary:
- Prior to this fix, the test relied upon begin() being evaluated after
the fbstring constructor (even thoug the order of evaluation of
function arguments is un-defined). When this assumption was violated,
begin() ended up with an iterator that was invalid since it points to
data internal to fbstring, and the fbstring copy constructor can end
up triggering re-allocation in the source.

Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D1014093
folly/test/FBStringTest.cpp