test: add -std=c++11

This test uses C++11 features (r-value references) in ObjC++.  Add a -std=c++11
to silence a warning.  NFC.
CodeGen: trivial conversion to range based loop

Switch to a range-based for loop.  NFC.