[clang-tools-extra] r252278 - Fix another case where loop-convert wasn't handling correctly data members.

2015-11-06 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Nov 6 03:59:14 2015 New Revision: 252278 URL: http://llvm.org/viewvc/llvm-project?rev=252278=rev Log: Fix another case where loop-convert wasn't handling correctly data members. Summary: If the container expression was obtained from the point where "size" (which

[clang-tools-extra] r252303 - Avoid naming conflicts with the old index in modernize-loop-convert.

2015-11-06 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Nov 6 08:04:12 2015 New Revision: 252303 URL: http://llvm.org/viewvc/llvm-project?rev=252303=rev Log: Avoid naming conflicts with the old index in modernize-loop-convert. Summary: The old index declaration is going to be removed anyway, so we can reuse its name if

[clang-tools-extra] r252308 - Use the old index identifier by default, instead of 'elem'.

2015-11-06 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Nov 6 09:03:14 2015 New Revision: 252308 URL: http://llvm.org/viewvc/llvm-project?rev=252308=rev Log: Use the old index identifier by default, instead of 'elem'. Summary: Use the old index name in the cases where the check would come up with an invented name.

[clang-tools-extra] r252315 - Allow the alias to be of a different type.

2015-11-06 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Nov 6 09:47:04 2015 New Revision: 252315 URL: http://llvm.org/viewvc/llvm-project?rev=252315=rev Log: Allow the alias to be of a different type. Summary: Consider a declaration an alias even if it doesn't have the same unqualified type than the container element,

[clang-tools-extra] r252041 - Improve modernize-make-unique matcher.

2015-11-04 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Nov 4 04:27:51 2015 New Revision: 252041 URL: http://llvm.org/viewvc/llvm-project?rev=252041=rev Log: Improve modernize-make-unique matcher. Summary: "std::unique_ptr" is not the same type as "std::unique_ptr", unless we insert a

[clang-tools-extra] r251940 - Improve more the const-detection in modernize-loop-convert.

2015-11-03 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Nov 3 10:31:36 2015 New Revision: 251940 URL: http://llvm.org/viewvc/llvm-project?rev=251940=rev Log: Improve more the const-detection in modernize-loop-convert. Summary: The previous change was focused in detecting when a non-const object was used in a constant

[clang-tools-extra] r251943 - Handle correctly containers that are data members in modernize-loop-convert.

2015-11-03 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Nov 3 10:38:31 2015 New Revision: 251943 URL: http://llvm.org/viewvc/llvm-project?rev=251943=rev Log: Handle correctly containers that are data members in modernize-loop-convert. Summary: I recently found that the variable naming wasn't working as expected with

[clang-tools-extra] r251803 - Remove unreachable that was reached in modernize-use-nullptr.

2015-11-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Nov 2 09:28:06 2015 New Revision: 251803 URL: http://llvm.org/viewvc/llvm-project?rev=251803=rev Log: Remove unreachable that was reached in modernize-use-nullptr. Summary: When traversing the parent map, the check assumed that all the nodes would be either Stmt

[clang-tools-extra] r251808 - Make the modernize-loop-convert's const-detection smarter.

2015-11-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Nov 2 11:02:52 2015 New Revision: 251808 URL: http://llvm.org/viewvc/llvm-project?rev=251808=rev Log: Make the modernize-loop-convert's const-detection smarter. Summary: Now, it detects that several kinds of usages are can't modify the elements. Examples: -When an

[clang-tools-extra] r251807 - Fix another crash in the redundant-void-arg check.

2015-11-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Nov 2 10:18:23 2015 New Revision: 251807 URL: http://llvm.org/viewvc/llvm-project?rev=251807=rev Log: Fix another crash in the redundant-void-arg check. Summary: The check was assuming that a definition of a function always has a body, but a declaration that

[clang-tools-extra] r251790 - Try to fix buildbots failure.

2015-11-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Nov 2 04:54:50 2015 New Revision: 251790 URL: http://llvm.org/viewvc/llvm-project?rev=251790=rev Log: Try to fix buildbots failure. Summary: Add -fexceptions flag to enable exceptions. Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D14225

[clang-tools-extra] r251792 - Fix crash in redundant-void-arg check.

2015-11-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Nov 2 05:39:17 2015 New Revision: 251792 URL: http://llvm.org/viewvc/llvm-project?rev=251792=rev Log: Fix crash in redundant-void-arg check. Summary: When applying this check to the unit tests, it would hit an assertion: llvm/tools/clang/lib/Lex/Lexer.cpp:1056:

[clang-tools-extra] r251788 - modernize-use-default supports copy constructor and copy-assignment operator.

2015-11-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Nov 2 04:34:19 2015 New Revision: 251788 URL: http://llvm.org/viewvc/llvm-project?rev=251788=rev Log: modernize-use-default supports copy constructor and copy-assignment operator. Summary: the check will now warn when the user provided definitions of this

[clang-tools-extra] r251694 - Only copy small types in modernize-loop-convert.

2015-10-30 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Oct 30 04:37:57 2015 New Revision: 251694 URL: http://llvm.org/viewvc/llvm-project?rev=251694=rev Log: Only copy small types in modernize-loop-convert. Summary: If the size of the type is above a certain bound, we'll take a const reference. This bound can be set as

r251693 - Add "equalsNode" for types and "isCopyAssignmentOperator" matchers.

2015-10-30 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Oct 30 04:35:51 2015 New Revision: 251693 URL: http://llvm.org/viewvc/llvm-project?rev=251693=rev Log: Add "equalsNode" for types and "isCopyAssignmentOperator" matchers. Summary: This matchers are going to be used in modernize-use-default, but are generic enough

[clang-tools-extra] r251013 - Correctly print the type in modernize-make-unique.

2015-10-22 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Oct 22 08:20:49 2015 New Revision: 251013 URL: http://llvm.org/viewvc/llvm-project?rev=251013=rev Log: Correctly print the type in modernize-make-unique. Summary: Take into account the current LangOptions the check has to add back the template argument. Reviewers:

[clang-tools-extra] r251015 - Don't use "auto" on loops over fundamental types in modernize-loop-convert.

2015-10-22 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Oct 22 08:23:46 2015 New Revision: 251015 URL: http://llvm.org/viewvc/llvm-project?rev=251015=rev Log: Don't use "auto" on loops over fundamental types in modernize-loop-convert. Summary: using "auto" on a loop that iterates over ints is kind of an overkill. Use

[clang-tools-extra] r250897 - Add modernize-use-default check to clang-tidy.

2015-10-21 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Oct 21 07:58:15 2015 New Revision: 250897 URL: http://llvm.org/viewvc/llvm-project?rev=250897=rev Log: Add modernize-use-default check to clang-tidy. Summary: Add a check that replaces empty bodies of special member functions with '= default;'. For now, it is only

[clang-tools-extra] r250824 - Apply modernize-use-default to clang-tools-extra.

2015-10-20 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Oct 20 07:56:27 2015 New Revision: 250824 URL: http://llvm.org/viewvc/llvm-project?rev=250824=rev Log: Apply modernize-use-default to clang-tools-extra. Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: klimek

[clang-tools-extra] r250509 - Fix overlapping replacements in clang-tidy.

2015-10-16 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Oct 16 06:43:49 2015 New Revision: 250509 URL: http://llvm.org/viewvc/llvm-project?rev=250509=rev Log: Fix overlapping replacements in clang-tidy. Summary: Prevent clang-tidy from applying fixes to errors that overlap with other errors' fixes, with one exception:

[clang-tools-extra] r250523 - Replacements in different files do not overlap.

2015-10-16 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Oct 16 11:15:27 2015 New Revision: 250523 URL: http://llvm.org/viewvc/llvm-project?rev=250523=rev Log: Replacements in different files do not overlap. Summary: Prevent clang-tidy from discarding fixes that are in different files but happen to have the same file

[clang-tools-extra] r250283 - Support every kind of initialization.

2015-10-14 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Oct 14 04:22:32 2015 New Revision: 250283 URL: http://llvm.org/viewvc/llvm-project?rev=250283=rev Log: Support every kind of initialization. Summary: modernize-make-unique now correctly supports the different kinds of list initialization. Reviewers: klimek

[clang-tools-extra] r250284 - Prevent modernize-use-auto from emitting a warning when 'auto' was already being used.

2015-10-14 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Oct 14 04:29:55 2015 New Revision: 250284 URL: http://llvm.org/viewvc/llvm-project?rev=250284=rev Log: Prevent modernize-use-auto from emitting a warning when 'auto' was already being used. Summary: This fixes https://llvm.org/bugs/show_bug.cgi?id=25082 .

[clang-tools-extra] r250288 - Use __SIZE_TYPE__ to fix buildbot failures.

2015-10-14 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Oct 14 05:30:32 2015 New Revision: 250288 URL: http://llvm.org/viewvc/llvm-project?rev=250288=rev Log: Use __SIZE_TYPE__ to fix buildbot failures. Summary: Use __SIZE_TYPE__ to fix buildbot failures. Reviewers: klimek Subscribers: cfe-commits Differential

[clang-tools-extra] r249402 - Create interfaces and tests for the overlapping replacements fix in clang-tidy.

2015-10-06 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Oct 6 08:52:51 2015 New Revision: 249402 URL: http://llvm.org/viewvc/llvm-project?rev=249402=rev Log: Create interfaces and tests for the overlapping replacements fix in clang-tidy. Summary: No changes in clang-tidy yet. Reviewers: klimek Subscribers: alexfh,

[clang-tools-extra] r249291 - Fix bug in modernize-use-nullptr.

2015-10-05 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Oct 5 03:40:13 2015 New Revision: 249291 URL: http://llvm.org/viewvc/llvm-project?rev=249291=rev Log: Fix bug in modernize-use-nullptr. Summary: https://llvm.org/bugs/show_bug.cgi?id=24960 modernize-use-nullptr would hit an assertion in some cases involving macros

[clang-tools-extra] r249300 - Document a bug in loop-convert and fix one of its subcases.

2015-10-05 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Oct 5 06:15:39 2015 New Revision: 249300 URL: http://llvm.org/viewvc/llvm-project?rev=249300=rev Log: Document a bug in loop-convert and fix one of its subcases. Summary: Now that we prioritize copying trivial types over using const-references where possible, I

[clang-tools-extra] r249305 - Use better mocks in modernize-make-unique, and fix matcher.

2015-10-05 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Oct 5 07:20:17 2015 New Revision: 249305 URL: http://llvm.org/viewvc/llvm-project?rev=249305=rev Log: Use better mocks in modernize-make-unique, and fix matcher. Summary: Add the second template argument to the unique_ptr mock, and update the matcher so that it

r249129 - Divide TraverseInitListExpr to a different function for each form.

2015-10-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Oct 2 08:25:51 2015 New Revision: 249129 URL: http://llvm.org/viewvc/llvm-project?rev=249129=rev Log: Divide TraverseInitListExpr to a different function for each form. Summary: create TraverseSyntacticInitListExpr and TraverseSemanticInitListExpr. Reviewers:

[clang-tools-extra] r249127 - Handle trailing underscores on modernize-loop-convert variable namer.

2015-10-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Oct 2 08:20:11 2015 New Revision: 249127 URL: http://llvm.org/viewvc/llvm-project?rev=249127=rev Log: Handle trailing underscores on modernize-loop-convert variable namer. Summary: https://llvm.org/bugs/show_bug.cgi?id=24961. Reviewers: klimek Subscribers:

[clang-tools-extra] r249017 - Update clang-tidy documentation.

2015-10-01 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Oct 1 09:50:40 2015 New Revision: 249017 URL: http://llvm.org/viewvc/llvm-project?rev=249017=rev Log: Update clang-tidy documentation. Summary: Improve modernize-use-auto documentation (https://llvm.org/bugs/show_bug.cgi?id=24962). Add documentation for

[clang-tools-extra] r248994 - Add support for 'cbegin()' and 'cend()' on modernize-loop-convert.

2015-10-01 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Oct 1 03:57:11 2015 New Revision: 248994 URL: http://llvm.org/viewvc/llvm-project?rev=248994=rev Log: 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

[clang-tools-extra] r248507 - Remove dangling parenthesis.

2015-09-24 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Sep 24 10:29:46 2015 New Revision: 248507 URL: http://llvm.org/viewvc/llvm-project?rev=248507=rev Log: Remove dangling parenthesis. Summary: Remove parenthesis surrounding the new loop index. Reviewers: klimek Subscribers: cfe-commits, klimek Differential

[clang-tools-extra] r248153 - Replace references to "transform" with references to "check" where neccessary in the documentation.

2015-09-21 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Mon Sep 21 07:53:30 2015 New Revision: 248153 URL: http://llvm.org/viewvc/llvm-project?rev=248153=rev Log: Replace references to "transform" with references to "check" where neccessary in the documentation. Summary: Replace references to "transform" with references to

[clang-tools-extra] r247987 - Update clang-tidy documentation.

2015-09-18 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Sep 18 09:08:57 2015 New Revision: 247987 URL: http://llvm.org/viewvc/llvm-project?rev=247987=rev Log: Update clang-tidy documentation. Summary: Update documentation of the modernize module with clang-modernize's documentation. Subscribers: cfe-commits, klimek,

[clang-tools-extra] r247889 - Add a test to modernize-loop-convert.

2015-09-17 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Sep 17 09:25:39 2015 New Revision: 247889 URL: http://llvm.org/viewvc/llvm-project?rev=247889=rev Log: Add a test to modernize-loop-convert. Summary: Add the test about replacements in several arguments of the same macro call, now that the problem has been fixed.

[clang-tools-extra] r247399 - Another patch for modernize-loop-convert.

2015-09-11 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Sep 11 05:02:07 2015 New Revision: 247399 URL: http://llvm.org/viewvc/llvm-project?rev=247399=rev Log: 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

[clang-tools-extra] r246989 - Avoid using rvalue references with trivially copyable types.

2015-09-08 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Sep 8 04:01:21 2015 New Revision: 246989 URL: http://llvm.org/viewvc/llvm-project?rev=246989=rev Log: Avoid using rvalue references with trivially copyable types. Summary: When the dereference operator returns a value that is trivially copyable (like a pointer),

[clang-tools-extra] r246762 - Two more fixes to loop convert.

2015-09-03 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Thu Sep 3 07:28:11 2015 New Revision: 246762 URL: http://llvm.org/viewvc/llvm-project?rev=246762=rev Log: Two more fixes to loop convert. Summary: Ensure that the alias has the same type than the loop variable. Now it works with lambda captures. Reviewers: klimek

[clang-tools-extra] r246638 - Fix use-auto-check.

2015-09-02 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Sep 2 05:20:00 2015 New Revision: 246638 URL: http://llvm.org/viewvc/llvm-project?rev=246638=rev Log: Fix use-auto-check. Summary: Fix a bug where use-auto check would crash when the definition of a type is in the same statement than its instantiation with new.

[clang-tools-extra] r246550 - Fix several corner cases for loop-convert check.

2015-09-01 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Sep 1 10:05:15 2015 New Revision: 246550 URL: http://llvm.org/viewvc/llvm-project?rev=246550=rev Log: Fix several corner cases for loop-convert check. Summary: Reduced the amount of wrong conversions of this check. Reviewers: klimek Subscribers: alexfh,

[clang-tools-extra] r246039 - Fix another LoopConvert fail.

2015-08-26 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Aug 26 12:08:24 2015 New Revision: 246039 URL: http://llvm.org/viewvc/llvm-project?rev=246039view=rev Log: Fix another LoopConvert fail. Summary: Prevent LoopConvert from taking as alias anything that comes from a random member function call. Reviewers: alexfh

[clang-tools-extra] r246034 - LoopConvert no longer take as alias references to other containers.

2015-08-26 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Wed Aug 26 09:51:11 2015 New Revision: 246034 URL: http://llvm.org/viewvc/llvm-project?rev=246034view=rev Log: LoopConvert no longer take as alias references to other containers. Summary: Fix a bug where modernize-loop-convert check would take as alias a reference to

[clang-tools-extra] r245942 - Avoid LoopConvertCheck replacements in template instantiations.

2015-08-25 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Aug 25 10:44:00 2015 New Revision: 245942 URL: http://llvm.org/viewvc/llvm-project?rev=245942view=rev Log: Avoid LoopConvertCheck replacements in template instantiations. Summary: Prevent LoopConvertCheck from doing replacements in template instantiations, and add

[clang-tools-extra] r245926 - Tests no longer need the 'REQUIRES: SHELL' line.

2015-08-25 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Tue Aug 25 03:39:34 2015 New Revision: 245926 URL: http://llvm.org/viewvc/llvm-project?rev=245926view=rev Log: Tests no longer need the 'REQUIRES: SHELL' line. Summary: Update python script, so that it doesn't print that line in new tests. Reviewers: alexfh

[clang-tools-extra] r245701 - Test commit!

2015-08-21 Thread Angel Garcia Gomez via cfe-commits
Author: angelgarcia Date: Fri Aug 21 08:55:16 2015 New Revision: 245701 URL: http://llvm.org/viewvc/llvm-project?rev=245701view=rev Log: Test commit! Modified: clang-tools-extra/trunk/clang-tidy/modernize/UseNullptrCheck.cpp Modified: