angelgarcia updated this revision to Diff 33690.
angelgarcia added a comment.
Renamed Usage::E, moved some tests and other fixes.
http://reviews.llvm.org/D12530
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/modernize/LoopConvertUtils.cpp
clang-tidy/modernize/LoopConvertUtils
angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added subscribers: klimek, cfe-commits.
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.
http://reviews.llvm.org/D12551
Files:
angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added subscribers: klimek, cfe-commits.
loop-convert no longer crashes when calling a member function using a member
pointer which is a member of another record.
http://reviews.llvm.org/D12555
Files:
clang-ti
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Ensure that the alias has the same type than the loop variable. Now it works
with lambda captures.
http://reviews.llvm.org/D12597
Files:
clang-tidy/modernize/LoopConver
angelgarcia updated this revision to Diff 33936.
angelgarcia added a comment.
Remove unused include.
http://reviews.llvm.org/D12597
Files:
clang-tidy/modernize/LoopConvertUtils.cpp
clang-tidy/modernize/LoopConvertUtils.h
test/clang-tidy/modernize-loop-convert-extra.cpp
Index: test/clang-
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
The InitListExpr subtree is visited twice, this caused the check to do multiple
replacements. Added a set to avoid it.
http://reviews.llvm.org/D12631
Files:
clang-tidy/
angelgarcia added a comment.
Anyway, I just found that this needs a few more changes (it still does
duplicated replacementes inside some macros, and I have to find out why), so
don't bother with this for now.
Comment at: clang-tidy/modernize/LoopConvertUtils.cpp:465
@@ +464,3
angelgarcia updated this revision to Diff 34035.
angelgarcia added a comment.
I think this solves the duplication problem. And I think is clearer and cheaper
than what I was trying to do before.
http://reviews.llvm.org/D12631
Files:
clang-tidy/modernize/LoopConvertUtils.cpp
clang-tidy/mode
angelgarcia updated this revision to Diff 34039.
angelgarcia marked 2 inline comments as done.
angelgarcia added a comment.
Ok! I wasn't sure, and a while would be correct in both cases :)
http://reviews.llvm.org/D12631
Files:
clang-tidy/modernize/LoopConvertUtils.cpp
clang-tidy/modernize/L
angelgarcia updated this revision to Diff 34054.
angelgarcia added a comment.
Yes, with SpellingLoc works as well, and it should be better.
http://reviews.llvm.org/D12631
Files:
clang-tidy/modernize/LoopConvertUtils.cpp
clang-tidy/modernize/LoopConvertUtils.h
test/clang-tidy/modernize-loo
angelgarcia updated this revision to Diff 34076.
angelgarcia added a comment.
Wooops, solved.
http://reviews.llvm.org/D12631
Files:
clang-tidy/modernize/LoopConvertUtils.cpp
clang-tidy/modernize/LoopConvertUtils.h
test/clang-tidy/modernize-loop-convert-extra.cpp
Index: test/clang-tidy/mo
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
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 who
angelgarcia updated this revision to Diff 34158.
angelgarcia added a comment.
Add struct with the parameters of the replacement. Also fix a potential source
of crashes from a previous patch.
http://reviews.llvm.org/D12675
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/moderniz
angelgarcia marked 3 inline comments as done.
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:658-663
@@ -646,7 +657,8 @@
+ IsTriviallyCopyable = BeginPointeeType.isTriviallyCopyableType(*Context);
} else {
// Check for qualified types to avoid conversions f
angelgarcia updated this revision to Diff 34160.
angelgarcia added a comment.
Avoid relying in a single usage for determining if the type is trivially
copyable.
http://reviews.llvm.org/D12675
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/modernize/LoopConvertCheck.h
clang-t
angelgarcia added inline comments.
Comment at: clang-tidy/modernize/LoopConvertCheck.cpp:659-664
@@ -646,7 +658,8 @@
+ BeginPointeeType.isTriviallyCopyableType(*Context);
} else {
// Check for qualified types to avoid conversions from non-const to const
angelgarcia updated this revision to Diff 34162.
angelgarcia added a comment.
This is the test case I was worried about.
http://reviews.llvm.org/D12675
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/modernize/LoopConvertCheck.h
clang-tidy/modernize/LoopConvertUtils.cpp
test
This revision was automatically updated to reflect the committed changes.
Closed by commit rL246989: Avoid using rvalue references with trivially
copyable types. (authored by angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D12675?vs=34162&id=34201#toc
Repository:
rL LLVM
http
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
modernize-make-unique now correctly supports the different kinds of list
initialization.
http://reviews.llvm.org/D13590
Files:
clang-tidy/modernize/MakeUniqueCheck.cpp
angelgarcia updated this revision to Diff 37322.
angelgarcia added a comment.
Remove \code and \endcode.
http://reviews.llvm.org/D13590
Files:
clang-tidy/modernize/MakeUniqueCheck.cpp
test/clang-tidy/modernize-make-unique.cpp
Index: test/clang-tidy/modernize-make-unique.cpp
===
angelgarcia updated this revision to Diff 37323.
angelgarcia added a comment.
Fix comments.
http://reviews.llvm.org/D13516
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
unittests/clang-tidy/OverlappingReplacementsTest.cpp
Index: unittests/clan
angelgarcia added a comment.
> These need to be documented.
Done.
> I'd name this Queue instead (reading later I had no idea what this was).
Done.
> Why are you calling this "Sit"?
I didn't even know how to describe this variable without using examples,
and naming it is harder. More or les
angelgarcia added a comment.
Ping
http://reviews.llvm.org/D13504
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added a subscriber: cfe-commits.
Use __SIZE_TYPE__ to fix buildbot failures.
http://reviews.llvm.org/D13720
Files:
test/clang-tidy/modernize-make-unique.cpp
Index: test/clang-tidy/modernize-make-unique.cpp
==
angelgarcia updated this revision to Diff 37334.
angelgarcia added a comment.
Add an enum and rename "Sit" to "Coverage" to improve readability.
http://reviews.llvm.org/D13516
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
unittests/clang-tidy/O
angelgarcia updated this revision to Diff 37336.
angelgarcia added a comment.
Done.
http://reviews.llvm.org/D13516
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
unittests/clang-tidy/OverlappingReplacementsTest.cpp
Index: unittests/clang-tidy/O
angelgarcia updated this revision to Diff 37344.
angelgarcia added a comment.
Use bounding boxes to reduce complexity.
http://reviews.llvm.org/D13516
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
unittests/clang-tidy/OverlappingReplacementsTest
angelgarcia added a comment.
I've done a couple of runs for each version, and these are the results (I
have clang-tidy compiled with the option "RelWithDebInfo"):
$ time clang-tidy -checks=* test.cpp -- -std=c++11
Without looking for overlaps.
Suppressed 23463 warnings (23463 in non-user code).
angelgarcia added a comment.
That works pretty well (well, identical end points have to be sorted
decreasingly, if I understand correctly). I see a couple of problems
though, like equal intervals, or consecutive. But the algorithm is way more
efficient than what we currently have, I will try to ma
angelgarcia updated this revision to Diff 37465.
angelgarcia added a comment.
I did several mutations and the only case were a test didn't break was when I
removed the sort, but it turned out that we don't need it. I changed the tests
to apply the checks in both orders to ensure that a test will
angelgarcia added a comment.
I cannot find a way to make Daniel's idea work with equal intervals:
In this case, fix A can be applied because B is completely contained inside
it.
A: [a, b)[c, d)
B: [a, b)
This time, we should not apply anyone:
A: [a, b)
B: [a, b)
And here they both have to be di
angelgarcia added a comment.
I implemented this, with the following addition: if several errors share
the same interval, I can still apply the biggest one that was not discarded
during the sweep. This way, the first example would work and in the two
other examples it would just apply a random one,
angelgarcia updated this revision to Diff 37568.
angelgarcia added a comment.
New algorithm :)
http://reviews.llvm.org/D13516
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
unittests/clang-tidy/OverlappingReplacementsTest.cpp
Index: unittests/c
angelgarcia updated this revision to Diff 37569.
angelgarcia added a comment.
Remove unused include, fix typo and rename Count to OpenIntervals.
http://reviews.llvm.org/D13516
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
clang-tidy/ClangTidyDiagnosticConsumer.h
unittests/clang-tidy/O
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Prevent clang-tidy from discarding fixes that are in different files but happen
to have the same file offset.
http://reviews.llvm.org/D13810
Files:
clang-tidy/ClangTidy
angelgarcia updated this revision to Diff 37600.
angelgarcia added a comment.
Add a test.
http://reviews.llvm.org/D13810
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
test/clang-tidy/Inputs/overlapping/
test/clang-tidy/Inputs/overlapping/o.h
test/clang-tidy/overlapping.cpp
Index: t
angelgarcia updated this revision to Diff 37602.
angelgarcia added a comment.
Use "not" instead of "!".
http://reviews.llvm.org/D13810
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
test/clang-tidy/Inputs/overlapping/
test/clang-tidy/Inputs/overlapping/o.h
test/clang-tidy/overlapping
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250523: Replacements in different files do not overlap.
(authored by angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D13810?vs=37603&id=37604#toc
Repository:
rL LLVM
http://reviews.ll
angelgarcia updated this revision to Diff 37603.
angelgarcia added a comment.
In both files.
http://reviews.llvm.org/D13810
Files:
clang-tidy/ClangTidyDiagnosticConsumer.cpp
test/clang-tidy/Inputs/overlapping/
test/clang-tidy/Inputs/overlapping/o.h
test/clang-tidy/overlapping.cpp
Index
Using these as the default comparison operators might not make much sense,
as they don't take into account all the fields (they only look at
ClangTidyError::Message). But here I just wanted to mimic existing
behavior, so honestly I don't know.
I implemented equality with !<&&!< to improve maintain
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Add a check that replaces empty bodies of special member functions with '=
default;'.
For now, it is only implemented for the default constructor and the destructor,
which
angelgarcia updated this revision to Diff 37833.
angelgarcia added a comment.
Global variable -> static, and a few other additions.
> Will be good idea to add handling of cases where default constructor is empty
> and only call base class(es) default constructor/members default constructors
I
angelgarcia updated this revision to Diff 37859.
angelgarcia added a comment.
Remove the fixme.
http://reviews.llvm.org/D13871
Files:
clang-tidy/modernize/CMakeLists.txt
clang-tidy/modernize/ModernizeTidyModule.cpp
clang-tidy/modernize/UseDefaultCheck.cpp
clang-tidy/modernize/UseDefault
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Replace empty bodies of default constructors and destructors with '= default'.
http://reviews.llvm.org/D13889
Files:
clang-modernize/Core/IncludeDirectives.cpp
clang-m
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Herald added a subscriber: klimek.
Replace empty bodies of default constructors and destructors with '= default'.
http://reviews.llvm.org/D13890
Files:
include/clang/AST
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Replace empty bodies of default constructors and destructors with '= default'.
http://reviews.llvm.org/D13892
Files:
lib/asan/asan_fake_stack.h
lib/msan/msan_allocator
angelgarcia updated this revision to Diff 37867.
angelgarcia added a comment.
Put comment back.
http://reviews.llvm.org/D13890
Files:
include/clang/AST/ASTConsumer.h
include/clang/AST/CanonicalType.h
include/clang/AST/DeclFriend.h
include/clang/AST/DeclTemplate.h
include/clang/AST/Exp
angelgarcia updated this revision to Diff 37868.
angelgarcia added a comment.
Put comments back.
http://reviews.llvm.org/D13892
Files:
lib/asan/asan_fake_stack.h
lib/msan/msan_allocator.h
lib/sanitizer_common/sanitizer_bitvector.h
lib/tsan/rtl/tsan_clock.h
lib/tsan/rtl/tsan_mutex.cc
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250823: Apply modernize-use-default to compiler-rt.
(authored by angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D13892?vs=37868&id=37869#toc
Repository:
rL LLVM
http://reviews.llvm.o
angelgarcia created this revision.
angelgarcia added a subscriber: cfe-commits.
Herald added a subscriber: klimek.
It breaks the build for the ASTMatchers
http://reviews.llvm.org/D13893
Files:
include/clang/AST/ASTConsumer.h
include/clang/AST/CanonicalType.h
include/clang/AST/DeclFriend.h
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250827: Roll-back r250822. (authored by angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D13893?vs=37875&id=37878#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13893
Files:
cfe/tr
Sorry, I have just seen all this. Thank you for reverting it, David.
On Tue, Oct 20, 2015 at 11:48 PM, David Blaikie wrote:
> Reverted in r250862
>
> On Tue, Oct 20, 2015 at 2:39 PM, Tobias Grosser wrote:
>
>> On 10/20/2015 11:37 PM, David Blaikie wrote:
>>
>>>
>>>
>>> On Tue, Oct 20, 2015 at 2
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added a subscriber: cfe-commits.
Add static to global variables, if they are not in an anonymous namespace.
http://reviews.llvm.org/D13975
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/moderniz
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
using "auto" on a loop that iterates over ints is kind of an overkill. Use the
real type name instead.
http://reviews.llvm.org/D13982
Files:
clang-tidy/modernize/LoopCo
angelgarcia updated this revision to Diff 38119.
angelgarcia added a comment.
Add a guard to check that ElemType is not null.
http://reviews.llvm.org/D13982
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/modernize/LoopConvertCheck.h
test/clang-tidy/modernize-loop-convert-basi
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Take into account the current LangOptions the check has to add back the
template argument.
http://reviews.llvm.org/D13983
Files:
clang-tidy/modernize/MakeUniqueCheck.cp
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
the check will now warn when the user provided definitions of this functions is
equivalent to the explicitly defaulted ones.
http://reviews.llvm.org/D14145
Files:
clang
angelgarcia updated this revision to Diff 38648.
angelgarcia added a comment.
Small tweak.
http://reviews.llvm.org/D14145
Files:
clang-tidy/modernize/UseDefaultCheck.cpp
test/clang-tidy/modernize-use-default-copy.cpp
test/clang-tidy/modernize-use-default.cpp
Index: test/clang-tidy/modern
angelgarcia added a comment.
OK, thanks! I will try to refactor some of the parts into AST matchers
then. It will probably take some time, though.
http://reviews.llvm.org/D14145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.ll
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Herald added a subscriber: klimek.
This matchers are going to be used in modernize-use-default, but are generic
enough to be placed in ASTMatchers.h.
http://reviews.llvm.o
angelgarcia updated this revision to Diff 38664.
angelgarcia added a comment.
Refactor most of the code to use AST matchers.
Note that now this change requires http://reviews.llvm.org/D14152 to be applied
first.
http://reviews.llvm.org/D14145
Files:
clang-tidy/modernize/UseDefaultCheck.cpp
angelgarcia added a comment.
> In which cases can this be false? (I assume if not all are copied?)
This can be false is there is we do anything else than initializing the
bases and members. So the previous code is there to ensure that we do that
and this is here to ensure that we *only* do that.
angelgarcia added a comment.
You can initialize an indirect base if it's virtual.
http://reviews.llvm.org/D14145
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
angelgarcia updated this revision to Diff 38727.
angelgarcia added a comment.
Add tests.
http://reviews.llvm.org/D14152
Files:
include/clang/ASTMatchers/ASTMatchers.h
unittests/ASTMatchers/ASTMatchersTest.cpp
Index: unittests/ASTMatchers/ASTMatchersTest.cpp
angelgarcia updated this revision to Diff 38728.
angelgarcia added a comment.
Put more logic into the matchers.
Btw, do you know how can I get the exception specification of a function?
http://reviews.llvm.org/D14145
Files:
clang-tidy/modernize/UseDefaultCheck.cpp
test/clang-tidy/modernize
angelgarcia updated this revision to Diff 38730.
angelgarcia marked an inline comment as done.
angelgarcia added a comment.
Remove debugging code.
http://reviews.llvm.org/D14145
Files:
clang-tidy/modernize/UseDefaultCheck.cpp
test/clang-tidy/modernize-use-default-copy.cpp
test/clang-tidy/
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
If the size of the type is above a certain bound, we'll take a const reference.
This bound can be set as an option. For now, the default value is 16 bytes.
http://reviews.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251694: Only copy small types in modernize-loop-convert.
(authored by angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D14176?vs=38736&id=38789#toc
Repository:
rL LLVM
http://reviews.l
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
Now, it detects that several kinds of usages are can't modify the elements.
Examples:
-When an usage is a call to a const member function or operator of the element.
-If th
angelgarcia created this revision.
angelgarcia added reviewers: klimek, LegalizeAdulthood.
angelgarcia added subscribers: alexfh, cfe-commits.
When applying this check to the unit tests, it would hit an assertion:
llvm/tools/clang/lib/Lex/Lexer.cpp:1056: clang::SourceLocation
clang::Lexer::getSou
angelgarcia added a comment.
> Reading just this function, it is unclear what the 'container' is.
It should be clearer now.
> Can't CaptureBuRef be modified?
I added a comment with an explanation.
> But they are aliases. Shouldn't we then go into the const-ness of the
aliases?
I wanted to
angelgarcia updated this revision to Diff 38881.
angelgarcia added a comment.
Improve comments and add more tests.
http://reviews.llvm.org/D14198
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-basic.cpp
test/clang-tidy/modernize-loop-convert-camelb
angelgarcia created this revision.
angelgarcia added a subscriber: cfe-commits.
Add -fexceptions flag to enable exceptions.
http://reviews.llvm.org/D14225
Files:
test/clang-tidy/modernize-use-default-copy.cpp
test/clang-tidy/modernize-use-default.cpp
Index: test/clang-tidy/modernize-use-def
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251790: Try to fix buildbots failure. (authored by
angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D14225?vs=38885&id=38886#toc
Repository:
rL LLVM
http://reviews.llvm.org/D14225
Fil
angelgarcia updated this revision to Diff 38887.
angelgarcia added a comment.
Use Lexer::makeFileCharRange (and a few changes due to clang-format).
It seems to work as well.
http://reviews.llvm.org/D14204
Files:
clang-tidy/modernize/RedundantVoidArgCheck.cpp
test/clang-tidy/modernize-redun
angelgarcia updated this revision to Diff 38889.
angelgarcia added a comment.
Sorry, I forgot. That case works just fine.
http://reviews.llvm.org/D14204
Files:
clang-tidy/modernize/RedundantVoidArgCheck.cpp
test/clang-tidy/modernize-redundant-void-arg.cpp
Index: test/clang-tidy/modernize-r
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251792: Fix crash in redundant-void-arg check. (authored by
angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D14204?vs=38889&id=38890#toc
Repository:
rL LLVM
http://reviews.llvm.org/D1
angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added subscribers: cfe-commits, klimek.
When traversing the parent map, the check assumed that all the nodes would be
either Stmt or Decl. After r251101, this is no longer true: there can be
TypeLoc and NestedNa
angelgarcia updated this revision to Diff 38918.
angelgarcia added a comment.
Merge lines.
http://reviews.llvm.org/D14229
Files:
clang-tidy/modernize/UseNullptrCheck.cpp
test/clang-tidy/modernize-use-nullptr.cpp
Index: test/clang-tidy/modernize-use-nullptr.cpp
=
angelgarcia created this revision.
angelgarcia added a reviewer: alexfh.
angelgarcia added subscribers: cfe-commits, klimek.
The check was assuming that a definition of a function always has a body, but a
declaration that explicitly defaults or deletes a function is a definition too.
http://revi
angelgarcia updated this revision to Diff 38930.
angelgarcia added a comment.
OK, is it better now?
http://reviews.llvm.org/D14198
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-basic.cpp
test/clang-tidy/modernize-loop-convert-camelback.cpp
test/
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
The previous change was focused in detecting when a non-const object was used
in a constant way. Looks like I forgot the most important and trivial case:
when the object i
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
I recently found that the variable naming wasn't working as expected with
containers that are data members. The new index always received the name "Elem"
(or equivalent) r
This revision was automatically updated to reflect the committed changes.
Closed by commit rL251940: Improve more the const-detection in
modernize-loop-convert. (authored by angelgarcia).
Changed prior to commit:
http://reviews.llvm.org/D14282?vs=39052&id=39074#toc
Repository:
rL LLVM
http:
angelgarcia updated this revision to Diff 39075.
angelgarcia added a comment.
Merge with the latest revision.
http://reviews.llvm.org/D14289
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
clang-tidy/modernize/LoopConvertCheck.h
clang-tidy/modernize/LoopConvertUtils.h
test/clang-tidy/m
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
"std::unique_ptr" is not the same type as "std::unique_ptr>", unless we insert a "hasCanonicalType" in the
middle. Probably it also happens in other cases related to defaul
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
If the container expression was obtained from the point where "size" (which
usually is a const method) is invoked, then the topmost node in this expression
may be an impli
angelgarcia updated this revision to Diff 39350.
angelgarcia added a comment.
Update the method comment.
http://reviews.llvm.org/D14378
Files:
clang-tidy/modernize/LoopConvertCheck.cpp
test/clang-tidy/modernize-loop-convert-extra.cpp
Index: test/clang-tidy/modernize-loop-convert-extra.cpp
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: alexfh, cfe-commits.
The old index declaration is going to be removed anyway, so we can reuse its
name if it is the best candidate for the new index.
http://reviews.llvm.org/D14437
Files:
c
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added a subscriber: cfe-commits.
Use the old index name in the cases where the check would come up with an
invented name.
http://reviews.llvm.org/D14438
Files:
clang-tidy/modernize/LoopConvertUtils.cpp
test
angelgarcia created this revision.
angelgarcia added a reviewer: klimek.
angelgarcia added subscribers: cfe-commits, alexfh.
Consider a declaration an alias even if it doesn't have the same unqualified
type than the container element, as long as one can be converted to the other
using only impli
angelgarcia added a comment.
No. There is a test for that just before the one I added.
http://reviews.llvm.org/D14442
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
angelgarcia updated this revision to Diff 39530.
angelgarcia added a comment.
The test revealed a (already existing) bug. If we called getName() on a
CXXConversionDecl, we would get the following assertion:
include/clang/AST/Decl.h:170: llvm::StringRef clang::NamedDecl::getName()
const: Asserti
angelgarcia added a subscriber: angelgarcia.
angelgarcia added a comment.
The compiler complained about creating constant instances of classes
without a user provided constructor (which is the case for the ASTMatchers).
I gave up this change because it broke the build for a huge amount of
people
101 - 194 of 194 matches
Mail list logo