diff options
| author | Alexander Kornienko <alexfh@google.com> | 2015-01-23 15:10:37 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2015-01-23 15:10:37 +0000 |
| commit | e94b7c24c809dd398a146786e9612afa99ed0395 (patch) | |
| tree | 953cf3c54c9b64a40e2a925628eefb4072ad9a25 /clang/utils/TableGen/ClangAttrEmitter.cpp | |
| parent | a6354cae566699786f3755d684504e14518811e7 (diff) | |
| download | bcm5719-llvm-e94b7c24c809dd398a146786e9612afa99ed0395.tar.gz bcm5719-llvm-e94b7c24c809dd398a146786e9612afa99ed0395.zip | |
[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
Diffstat (limited to 'clang/utils/TableGen/ClangAttrEmitter.cpp')
0 files changed, 0 insertions, 0 deletions

