hanchenye-llvm-project/clang-tools-extra/clang-tidy
Alexander Kornienko e94b7c24c8 [clang-tidy] Use shrink_to_fit instead of copy and swap trick
The shrink_to_fit() method is more readable and more effective than
the copy and swap trick to reduce the capacity of a shrinkable container.
Note that, the shrink_to_fit() method is only available in C++11 and up.

Example:

std::vector<int>(v).swap(v); will be replaced with v.shrink_to_fit();

http://reviews.llvm.org/D7087

Patch by Gábor Horváth!

llvm-svn: 226912
2015-01-23 15:10:37 +00:00
..
google [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.py 2015-01-14 11:24:38 +00:00
llvm [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.py 2015-01-14 11:24:38 +00:00
misc [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.py 2015-01-14 11:24:38 +00:00
readability [clang-tidy] Use shrink_to_fit instead of copy and swap trick 2015-01-23 15:10:37 +00:00
tool [clang-tidy] Fix a typo. 2014-12-09 15:02:17 +00:00
utils Fix llvm-header-guard check. 2014-10-15 12:18:35 +00:00
CMakeLists.txt [CMake] Add dependencies on clangToolingCore. 2014-10-30 00:44:01 +00:00
ClangTidy.cpp Add flag --enable-check-profile to clang-tidy. 2014-10-23 17:23:20 +00:00
ClangTidy.h Add flag --enable-check-profile to clang-tidy. 2014-10-23 17:23:20 +00:00
ClangTidyDiagnosticConsumer.cpp [clang-tidy] Count errors in ClangTidyDiagnosticConsumer 2014-11-20 12:05:51 +00:00
ClangTidyDiagnosticConsumer.h Fixed a typo in a comment. NFC. 2014-12-19 15:37:02 +00:00
ClangTidyModule.cpp [clang-tidy] Default options in modules. 2014-10-16 11:27:57 +00:00
ClangTidyModule.h [clang-tidy] Default options in modules. 2014-10-16 11:27:57 +00:00
ClangTidyModuleRegistry.h clang-tidy: Instantiate llvm::Registry<clang::tidy::ClangTidyModule>. 2014-07-03 14:12:47 +00:00
ClangTidyOptions.cpp [clang-tidy] Make ClangTidyOptionsProvider::getOptions return by value. 2015-01-20 09:48:51 +00:00
ClangTidyOptions.h [clang-tidy] Make ClangTidyOptionsProvider::getOptions return by value. 2015-01-20 09:48:51 +00:00
Makefile Add NamespaceCommentCheck to the Google module. 2014-09-22 10:41:39 +00:00
add_new_check.py [clang-tidy] Extended the example check, added a fix-it, etc. 2014-12-09 12:43:09 +00:00