#
90bf895a |
| 01-Oct-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Prevent loop-convert from leaving empty lines after removing an alias declaration.
Summary: This fixes https://llvm.org/bugs/show_bug.cgi?id=17716.
Reviewers: klimek
Subscribers: cfe-commits, alex
Prevent loop-convert from leaving empty lines after removing an alias declaration.
Summary: This fixes https://llvm.org/bugs/show_bug.cgi?id=17716.
Reviewers: klimek
Subscribers: cfe-commits, alexfh
Differential Revision: http://reviews.llvm.org/D13342
llvm-svn: 249006
show more ...
|
#
2bfb7cbd |
| 01-Oct-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Add support for 'cbegin()' and 'cend()' on modernize-loop-convert.
Summary: This fixes https://llvm.org/bugs/show_bug.cgi?id=22196 .
Also add a non-trivially copyable type to fix some tests that we
Add support for 'cbegin()' and 'cend()' on modernize-loop-convert.
Summary: This fixes https://llvm.org/bugs/show_bug.cgi?id=22196 .
Also add a non-trivially copyable type to fix some tests that were meant to be about using const-refs, but were changed in r248438.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D13292
llvm-svn: 248994
show more ...
|
#
8535c6c2 |
| 24-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Add NamingStyle option to modernize-loop-convert.
Summary: Add an option to specify wich style must be followed when choosing the new index name.
Reviewers: alexfh
Subscribers: cfe-commits, klimek
Add NamingStyle option to modernize-loop-convert.
Summary: Add an option to specify wich style must be followed when choosing the new index name.
Reviewers: alexfh
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D13052
llvm-svn: 248517
show more ...
|
#
bd432b2d |
| 24-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Remove dangling parenthesis.
Summary: Remove parenthesis surrounding the new loop index.
Reviewers: klimek
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D13133
Remove dangling parenthesis.
Summary: Remove parenthesis surrounding the new loop index.
Reviewers: klimek
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D13133
llvm-svn: 248507
show more ...
|
#
aed6dde9 |
| 24-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Solve comment on rL248418.
Summary: Solve comment on rL248418.
Reviewers: alexfh
Subscribers: cfe-commits, klimek
Differential Revision: http://reviews.llvm.org/D13129
llvm-svn: 248489
|
#
a88ce501 |
| 24-Sep-2015 |
Manuel Klimek <klimek@google.com> |
Use simpler interface for getting the pointee type for a node.
llvm-svn: 248449
|
#
b457b68f |
| 23-Sep-2015 |
Manuel Klimek <klimek@google.com> |
Fix loop-convert for trivially copyable types.
Previously, we would rewrite: void f(const vector<int> &v) { for (size_t i = 0; i < v.size(); ++i) { to for (const auto &elem : v) {
Now we rewrit
Fix loop-convert for trivially copyable types.
Previously, we would rewrite: void f(const vector<int> &v) { for (size_t i = 0; i < v.size(); ++i) { to for (const auto &elem : v) {
Now we rewrite it to: for (auto elem : v) { (and similarly for iterator based loops).
llvm-svn: 248438
show more ...
|
#
143b6442 |
| 23-Sep-2015 |
Manuel Klimek <klimek@google.com> |
Fix loop-convert for const references to containers.
Previously we would use a non-const loop variable in the range-based loop for: void f(const std::vector<int> &v) { for (size_t i = 0; i < v.siz
Fix loop-convert for const references to containers.
Previously we would use a non-const loop variable in the range-based loop for: void f(const std::vector<int> &v) { for (size_t i = 0; i < v.size(); ++i) { Now we use const auto&.
Note that we'll also want to use a copy at least for simple types.
llvm-svn: 248418
show more ...
|
#
f41a631b |
| 21-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Refactor LoopConvertCheck.
Summary: Reorder the code in a more logical and understandable way.
Reviewers: klimek
Subscribers: cfe-commits, alexfh
Differential Revision: http://reviews.llvm.org/D1
Refactor LoopConvertCheck.
Summary: Reorder the code in a more logical and understandable way.
Reviewers: klimek
Subscribers: cfe-commits, alexfh
Differential Revision: http://reviews.llvm.org/D12797
llvm-svn: 248144
show more ...
|
#
b9ea09c4 |
| 17-Sep-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Refactors AST matching code to use the new AST matcher names. This patch correlates to r247885 which performs the AST matcher rename in Clang.
llvm-svn: 247886
|
#
bb9ca54b |
| 11-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Another patch for modernize-loop-convert.
Summary: 1. Avoid converting loops that iterate over the size of a container and don't use its elements, as this would result in an unused-result warning. 2
Another patch for modernize-loop-convert.
Summary: 1. Avoid converting loops that iterate over the size of a container and don't use its elements, as this would result in an unused-result warning. 2. Never capture the elements by value on lambdas, thus avoiding doing unnecessary copies and errors with non-copyable types. 3. The 'const auto &' instead of 'auto &' substitution on const containers now works on arrays and pseudoarrays as well. 4. The error about multiple replacements in the same macro call is now documented in the tests (not solved though). 5. Due to [1], I had to add a dummy usage of the range element (like "(void) *It;" or similars) on the tests that had empty loops. 6. I removed the braces from the CHECK comments. I think that there is no need for them, and they confuse vim.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D12734
llvm-svn: 247399
show more ...
|
#
d930ef76 |
| 08-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Avoid using rvalue references with trivially copyable types.
Summary: When the dereference operator returns a value that is trivially copyable (like a pointer), copy it. After this change, modernize
Avoid using rvalue references with trivially copyable types.
Summary: When the dereference operator returns a value that is trivially copyable (like a pointer), copy it. After this change, modernize-loop-convert check can be applied to the whole llvm source code without breaking any build or test.
Reviewers: alexfh, klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D12675
llvm-svn: 246989
show more ...
|
#
692cbb5b |
| 01-Sep-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Fix several corner cases for loop-convert check.
Summary: Reduced the amount of wrong conversions of this check.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://r
Fix several corner cases for loop-convert check.
Summary: Reduced the amount of wrong conversions of this check.
Reviewers: klimek
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D12530
llvm-svn: 246550
show more ...
|
#
8b0583ef |
| 28-Aug-2015 |
Aaron Ballman <aaron@aaronballman.com> |
Disable several more clang-tidy modernize checkers when not compiling in C++ mode. Loop conversion would make recommendations for C code, so added a test to ensure that does not happen. The pass by v
Disable several more clang-tidy modernize checkers when not compiling in C++ mode. Loop conversion would make recommendations for C code, so added a test to ensure that does not happen. The pass by value, use auto and replace auto_ptr checkers would not make recommendations for C code, and are disabled for performance reasons, but do not require an extra test.
llvm-svn: 246310
show more ...
|
Revision tags: llvmorg-3.7.0, llvmorg-3.7.0-rc4 |
|
#
06d010ca |
| 25-Aug-2015 |
Angel Garcia Gomez <angelgarcia@google.com> |
Avoid LoopConvertCheck replacements in template instantiations.
Summary: Prevent LoopConvertCheck from doing replacements in template instantiations, and add a test.
Reviewers: alexfh
Subscribers:
Avoid LoopConvertCheck replacements in template instantiations.
Summary: Prevent LoopConvertCheck from doing replacements in template instantiations, and add a test.
Reviewers: alexfh
Subscribers: klimek, cfe-commits
Differential Revision: http://reviews.llvm.org/D12321
llvm-svn: 245942
show more ...
|
Revision tags: llvmorg-3.7.0-rc3 |
|
#
74a44d91 |
| 20-Aug-2015 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Fix bug in modernize-loop-convert check.
http://reviews.llvm.org/D12186
Patch by Angel Garcia!
llvm-svn: 245561
|
#
e1292f8e |
| 19-Aug-2015 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Fix LoopConvertCheck bug.
Fix LoopConvertCheck bug: StringRef to temporaries.
Also add LLVM_ATTRIBUTE_UNUSED to ModernizeModuleAnchorDestination.
http://reviews.llvm.org/D12157
Patch
[clang-tidy] Fix LoopConvertCheck bug.
Fix LoopConvertCheck bug: StringRef to temporaries.
Also add LLVM_ATTRIBUTE_UNUSED to ModernizeModuleAnchorDestination.
http://reviews.llvm.org/D12157
Patch by Angel Garcia!
llvm-svn: 245458
show more ...
|
#
0497084b |
| 19-Aug-2015 |
Alexander Kornienko <alexfh@google.com> |
[clang-tidy] Add loop-convert check to clang-tidy.
Move LoopConvert from clang-modernize to modernize module in clang-tidy.
http://reviews.llvm.org/D12076
Patch by Angel Garcia!
llvm-svn: 245427
|