hanchenye-llvm-project/clang-tools-extra/test/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
..
Inputs [clang-tidy] Added -system-headers option. 2014-10-28 22:16:13 +00:00
arg-comments.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
basic.cpp [clang-tidy] Move the missing namespace comment warnings to the closing brace 2014-11-17 17:32:32 +00:00
check_clang_tidy.sh [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
clang-tidy-diff.cpp [clang-tidy] Count errors in ClangTidyDiagnosticConsumer 2014-11-20 12:05:51 +00:00
config-files.cpp Implemented clang-tidy configurability via .clang-tidy files. 2014-09-04 14:23:36 +00:00
deduplication.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
diagnostic.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
file-filter.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
fix-errors.cpp [clang-tidy] Added -fix-errors option 2014-11-03 14:06:31 +00:00
fix.cpp [clang-tidy] Add an option to export suggested fixes into a file. 2014-09-04 10:31:23 +00:00
google-explicit-constructor.cpp [clang-tidy] google-explicit-constructor: don't match in template instantiations 2014-11-30 19:41:41 +00:00
google-explicit-make-pair.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-member-string-references.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-memset-zero-length.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-module.cpp [clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10 2014-11-20 15:05:32 +00:00
google-namespaces.cpp [clang-tidy] Add namespaces checkers. 2014-07-16 14:16:56 +00:00
google-overloaded-unary-and.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-readability-casting.c [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-readability-casting.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-readability-function.cpp [clang-tidy] google-readability-function: skip std::nullptr_t 2014-11-05 11:08:39 +00:00
google-readability-namespace-comments.cpp [clang-tidy] Set google-readability-namespace-comments.ShortNamespaceLines to 10 2014-11-20 15:05:32 +00:00
google-readability-todo.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
google-runtime-int.c [clang-tidy] google-runtime-int: Don't check C code. 2014-12-08 11:17:25 +00:00
google-runtime-int.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
line-filter.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
llvm-include-order.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
llvm-twine-local.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
macros.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
misc-bool-pointer-implicit-conversion.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
misc-swapped-arguments.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
misc-undelegated-constructor.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
misc-uniqueptr-reset-release.cpp [clang-tidy] Add clang-tidy check for unique_ptr's reset+release -> move 2014-12-05 11:59:05 +00:00
misc-unused-raii.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
misc-use-override.cpp clang-tidy: [misc-use-override] Simplify regular expressions in test. 2015-01-09 14:10:15 +00:00
nolint.cpp [clang-tidy] Support initializer_list in google-explicit-constructor check 2014-11-27 11:11:47 +00:00
readability-braces-around-statements-few-lines.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
readability-braces-around-statements-same-line.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
readability-braces-around-statements-single-line.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
readability-braces-around-statements.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
readability-else-after-return.cpp clang-tidy: Add initial check for "Don't use else after return". 2015-01-14 19:37:54 +00:00
readability-function-size.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
readability-redundant-smartptr-get.cpp [clang-tidy] check_clang_tidy_fix.sh -> check_clang_tidy.sh 2014-10-26 02:58:07 +00:00
readability-shrink-to-fit.cpp [clang-tidy] Use shrink_to_fit instead of copy and swap trick 2015-01-23 15:10:37 +00:00
readibility-container-size-empty.cpp clang-tidy: 'size' call that could be replaced with 'empty' on STL containers 2015-01-15 15:46:58 +00:00
select-checks.cpp [clang-tidy] Move the missing namespace comment warnings to the closing brace 2014-11-17 17:32:32 +00:00
serialize-diagnostics.cpp [clang-tidy] Make a test independent of the default check set. 2014-12-03 13:48:46 +00:00
static-analyzer.cpp Change the behavior of clang-tidy -checks=, remove -disable-checks. 2014-05-15 14:27:36 +00:00
temporaries.cpp Change the behavior of clang-tidy -checks=, remove -disable-checks. 2014-05-15 14:27:36 +00:00
validate-check-names.cpp Implemented clang-tidy configurability via .clang-tidy files. 2014-09-04 14:23:36 +00:00