hanchenye-llvm-project/clang-tools-extra
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
..
clang-apply-replacements Handle newlines on Windows correctly. 2014-12-09 02:57:56 +00:00
clang-modernize Make LoopConvert work with containers that are used like arrays. 2015-01-12 13:17:56 +00:00
clang-query
clang-rename [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.py 2015-01-14 11:24:38 +00:00
clang-tidy [clang-tidy] Use shrink_to_fit instead of copy and swap trick 2015-01-23 15:10:37 +00:00
docs docs/conf.py: bump version to 3.7 2015-01-14 18:32:20 +00:00
modularize Replace size call with empty call where appripriate in clang/tools/extra 2015-01-22 13:14:29 +00:00
module-map-checker Replace size call with empty call where appripriate in clang/tools/extra 2015-01-22 13:14:29 +00:00
pp-trace
remove-cstr-calls [CMake] Add dependencies on clangToolingCore. 2014-10-30 00:44:01 +00:00
test [clang-tidy] Use shrink_to_fit instead of copy and swap trick 2015-01-23 15:10:37 +00:00
tool-template Fix Makefiles after r220867. 2014-10-29 18:55:41 +00:00
unittests [cleanup] Re-sort the #include lines with llvm/utils/sort_includes.py 2015-01-14 11:24:38 +00:00
.arcconfig
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT
LICENSE.TXT
Makefile
README.txt

README.txt

//===----------------------------------------------------------------------===//
// Clang Tools repository
//===----------------------------------------------------------------------===//

Welcome to the repository of extra Clang Tools.  This repository holds tools
that are developed as part of the LLVM compiler infrastructure project and the
Clang frontend.  These tools are kept in a separate "extra" repository to
allow lighter weight checkouts of the core Clang codebase.

This repository is only intended to be checked out inside of a full LLVM+Clang
tree, and in the 'tools/extra' subdirectory of the Clang checkout.

All discussion regarding Clang, Clang-based tools, and code in this repository
should be held using the standard Clang mailing lists:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

Code review for this tree should take place on the standard Clang patch and
commit lists:
  http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

If you find a bug in these tools, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/