hanchenye-llvm-project/clang-tools-extra/unittests
Haojian Wu d2825825f8 [clang-tidy ObjC] [2/3] Support non-C++ files in ClangTidyTest
Summary:
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

Patch by Ben Hamilton!

Reviewers: hokein, alexfh

Reviewed By: hokein

Subscribers: Wizard

Differential Revision: https://reviews.llvm.org/D39189

llvm-svn: 316645
2017-10-26 08:37:25 +00:00
..
change-namespace [change-namespace] do not change type locs in defaulted functions. 2017-10-16 08:20:10 +00:00
clang-apply-replacements ClangApplyReplacementsTests: Add clangBasic in libdeps. 2017-07-15 06:32:10 +00:00
clang-move [clang-move] Find template class forward declarations more precisely. 2017-05-02 12:15:11 +00:00
clang-query
clang-tidy [clang-tidy ObjC] [2/3] Support non-C++ files in ClangTidyTest 2017-10-26 08:37:25 +00:00
clangd [clangd] Allow to pass code completion opts to ClangdServer. 2017-10-23 14:46:48 +00:00
include/common
include-fixer [include-fixer] Add fuzzy SymbolIndex, where identifier needn't match exactly. 2017-03-13 15:55:59 +00:00
CMakeLists.txt [cmake] Support running extra clang tool tests without static analyzer 2017-08-29 05:58:08 +00:00