Now compiles fairly cleanly with clang 3.3 trunk.