This is part 2 of 3 of a series of changes to improve
Objective-C linting in clang-tidy.
Currently, clang::tidy::test::runCheckOnCode() assumes all files
are C++ and unconditionally adds -std=c++11 to the list of
clang-tidy options.
This updates the logic to check the extension of the source file
and only add -std=c++11 if the extension indicates C++ or
Objective-C++.
Depends On D39188
Test Plan:
ninja ClangTidyTests && \ ./tools/clang/tools/extra/unittests/clang-tidy/ClangTidyTests