Author: madsravn
Date: Sun May 26 10:00:38 2019
New Revision: 361735
URL: http://llvm.org/viewvc/llvm-project?rev=361735&view=rev
Log:
DeleteNullPointerCheck now deletes until the end brace of the condition.
Patch by Jonathan Camilleri
Differential Revision https://reviews.llvm.org/D61861
Modif
Hi Piotr,
That is a good point. Because it is not always -1 or 1 that determines
lexicographical higher or lower.
However, I don't think that is in the scope of this check. This check
checks for string comparison (equality or inequality). Adding a match for
if the user is using the compare functi
Hi Piotr,
Thank you for your detailed comments :)
I would love some help with the other fixit. I have some notes on it at
home. But my main catch is that is an implicit cast to boolean from
str.compare(str) with maybe an ! in front of it. And I need to fix that to
str.compare(str) == 0 or str.com
Hi,
The last mail was only meant to contain the question about the comment to
misc-suspicious-string-compare check.
Do you reckon I should remove that match from my check? Or should we move
it?
Best regards,
Mads Ravn
On Mon, Dec 26, 2016 at 8:48 PM Mads Ravn via Phabricator <
revi...@reviews.l
Author: madsravn
Date: Fri Dec 30 04:09:46 2016
New Revision: 290747
URL: http://llvm.org/viewvc/llvm-project?rev=290747&view=rev
Log:
[clang-tidy] Add check 'misc-string-compare'.
I have a created a new check for clang tidy: misc-string-compare. This will
check for incorrect usage of std::strin
Author: madsravn
Date: Fri Dec 30 14:49:44 2016
New Revision: 290766
URL: http://llvm.org/viewvc/llvm-project?rev=290766&view=rev
Log:
[clang] Minor fix to libASTMatcherTutorial
There was a small error in the code in the tutorial. The tutorial contains a
few errors which results in code not bein
madsravn updated this revision to Diff 69131.
madsravn marked 8 inline comments as done.
madsravn added a comment.
Updated the patch as suggested by hokein and alexfh.
https://reviews.llvm.org/D20512
Files:
clang-tidy/llvm/HeaderGuardCheck.cpp
clang-tidy/llvm/HeaderGuardCheck.h
clang-tidy
madsravn updated this revision to Diff 69143.
madsravn added a comment.
Fixed suggested by alexfh
https://reviews.llvm.org/D20512
Files:
clang-tidy/llvm/HeaderGuardCheck.cpp
clang-tidy/llvm/HeaderGuardCheck.h
clang-tidy/utils/HeaderFileExtensionsUtils.cpp
clang-tidy/utils/HeaderFileExte
madsravn updated this revision to Diff 69152.
madsravn marked 5 inline comments as done.
madsravn added a comment.
More suggestions by alexfh fixed.
https://reviews.llvm.org/D20512
Files:
clang-tidy/llvm/HeaderGuardCheck.cpp
clang-tidy/llvm/HeaderGuardCheck.h
clang-tidy/utils/HeaderFileEx
madsravn updated this revision to Diff 69158.
madsravn marked 2 inline comments as done.
madsravn added a comment.
Documentation fix.
https://reviews.llvm.org/D20512
Files:
clang-tidy/llvm/HeaderGuardCheck.cpp
clang-tidy/llvm/HeaderGuardCheck.h
clang-tidy/utils/HeaderFileExtensionsUtils.c
madsravn added a comment.
I have commit access. I can commit it myself :) thanks though.
Is the documentation correct? I wasn't sure about the "\n ..." part.
Comment at: clang-tidy/utils/HeaderGuard.h:15
@@ -14,1 +14,3 @@
+#include "../utils/HeaderFileExtensionsUtils.h"
+#incl
madsravn updated this revision to Diff 69164.
https://reviews.llvm.org/D20512
Files:
clang-tidy/llvm/HeaderGuardCheck.cpp
clang-tidy/llvm/HeaderGuardCheck.h
clang-tidy/utils/HeaderFileExtensionsUtils.cpp
clang-tidy/utils/HeaderFileExtensionsUtils.h
clang-tidy/utils/HeaderGuard.cpp
cla
madsravn added inline comments.
Comment at: docs/clang-tidy/checks/llvm-header-guard.rst:13
@@ +12,3 @@
+
+ ...
+
alexfh wrote:
> `...` was meant to represent the description of the option. Not literally
> `...` ;)
>
> The description should be indented by at l
madsravn updated this revision to Diff 69250.
madsravn added a comment.
Last change - documentation should be fine now.
https://reviews.llvm.org/D20512
Files:
clang-tidy/llvm/HeaderGuardCheck.cpp
clang-tidy/llvm/HeaderGuardCheck.h
clang-tidy/utils/HeaderFileExtensionsUtils.cpp
clang-tid
This revision was automatically updated to reflect the committed changes.
Closed by commit rL279803: [clang-tidy] Added hh, hxx and hpp to header guard
checks. (authored by madsravn).
Changed prior to commit:
https://reviews.llvm.org/D20512?vs=69250&id=69320#toc
Repository:
rL LLVM
https://
Author: madsravn
Date: Fri Aug 26 00:59:53 2016
New Revision: 279803
URL: http://llvm.org/viewvc/llvm-project?rev=279803&view=rev
Log:
[clang-tidy] Added hh, hxx and hpp to header guard checks.
Changed the extension check to include the option of ",h,hh,hpp,hxx" instead of
just returning whether
Author: madsravn
Date: Sun Feb 12 14:09:59 2017
New Revision: 294912
URL: http://llvm.org/viewvc/llvm-project?rev=294912&view=rev
Log:
[clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work
for class members
I have made a small fix for readability-delete-null-pointer check
Author: madsravn
Date: Sun Feb 12 14:35:42 2017
New Revision: 294913
URL: http://llvm.org/viewvc/llvm-project?rev=294913&view=rev
Log:
[clang-tidy] Fix for bug 31838: readability-delete-null-pointer does not work
for class members
Fix for commit r294912 which had a small error in the AST matcher
So remove the ifStmt from the third and fourth case?
So that I keep if(str1.compare(str2)) and if(!str1.compare(str2)), and
change the other two to str1.compare(str2) == 0 and str1.compare(str2) != 0
?
That makes good sense. Then I could also add some of the test cases you
mentioned earlier.
On
I think I got it. I will throw a new diff up within the hour.
Thanks for the ideas :)
On Wed, Nov 30, 2016 at 6:48 PM Malcolm Parsons
wrote:
> On 30 November 2016 at 17:18, Mads Ravn wrote:
> > So remove the ifStmt from the third and fourth case?
>
> I was thinking all cases.
> Can the first c
Hi Alexander,
I have now implemented your suggestions - all but the fixit one. If I have
added bindings for str1 and str2 in ast matcher, how would I go about
creating a replacement for the entire implicitCastExpr or binaryOperator? I
can't find any example in the code for clang-tidy to suggest ho
Hi Malcolm,
Thanks for the suggestions, I have been reading up on the fixits.
My initial four cases has been reduced to two a little more general cases:
1 & 2: implicitCast to bool str1.compare(str2). This case covers both
!str1.compare(str2) and str1.compare(str2)
3 & 4: str1.compare(str2) == 0 a
Hi Malcolm,
Matching for the single parameter overload of compare is probably a good
idea. I will do that.
> Comment at: test/clang-tidy/misc-string-compare.cpp:9
> + // CHECK-MESSAGES: [[@LINE-1]]:3: warning: do not use compare to test
equality of strings; use the string equality operator inste
Hi Malcolm,
Thanks. I will fix the last couple of things in the weekend and hopefully
have something worth showing there.
alexfh suggested that fixits seemed easy to implement. I am having a few
doubts as to how I would make fixits for case 1 & 2. How important would it
be to implement fixits at
Hi guys,
Do you have any extra comments for this?
Best regards
On Sat, Dec 3, 2016 at 1:34 PM Mads Ravn via Phabricator <
revi...@reviews.llvm.org> wrote:
> madsravn updated this revision to Diff 80177.
> madsravn added a comment.
>
> Did as comments suggested: Fixed the description about compa
Hi Malcolm,
I will look into fixing the two cases only.
argumentCountIs(1) is sufficient to narrow the matching to only string
compare with one argument.
Best regards,
Mads Ravn
On Mon, Dec 12, 2016 at 10:38 AM Malcolm Parsons via Phabricator <
revi...@reviews.llvm.org> wrote:
> malcolm.parsons
Author: madsravn
Date: Mon Apr 24 04:27:20 2017
New Revision: 301167
URL: http://llvm.org/viewvc/llvm-project?rev=301167&view=rev
Log:
[clang-tidy] New check: modernize-replace-random-shuffle.
This check will find occurrences of ``std::random_shuffle`` and replace it with
``std::shuffle``. In C+
Hi,
I would like to submit a patch for
https://llvm.org/bugs/show_bug.cgi?id=27400 .
Beside attaching the patch, is there anything I should be aware of? I have
not submitted a patch before.
You can find the patch attached to this mail.
Kind regards,
Mads Ravn
Index: clang-tidy/misc/MacroParenth
it for you.
>
> best
> vedant
>
> > On May 11, 2016, at 10:01 AM, Mads Ravn via cfe-commits <
> cfe-commits@lists.llvm.org> wrote:
> >
> > Hi,
> >
> > I would like to submit a patch for
> https://llvm.org/bugs/show_bug.cgi?id=27400 .
> >
Hi,
I hereby attach a patch to fix bug no. 27731:
https://llvm.org/bugs/show_bug.cgi?id=27731
Best regards,
Mads Ravn
Index: clang-tidy/modernize/PassByValueCheck.cpp
===
--- clang-tidy/modernize/PassByValueCheck.cpp (revision 269603
You can find examples
>> of test cases here:
>>
>> extra/test/clang-tidy/
>>
>> Apart from that, my only other nit-pick is that llvm uses 2-space
>> indents, and spaces between "if" and "(".
>>
>> If you reply to this list with an upda
amples
of test cases here:
>
> extra/test/clang-tidy/
>
> Apart from that, my only other nit-pick is that llvm uses 2-space
indents, and spaces between "if" and "(".
>
> If you reply to this list with an updated patch, someone would be happy
to commit it for
madsravn created this revision.
madsravn added reviewers: alexfh, vsk, djasper, klimek.
madsravn added a subscriber: cfe-commits.
This is a patch for bug: https://llvm.org/bugs/show_bug.cgi?id=27731
I have excluded types which are trivially copyable from being called with
std::move in the modern
madsravn added a comment.
Just curious, as I'm sort of new to this. How long will it take before its
merged in?
http://reviews.llvm.org/D20365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cf
madsravn added a comment.
@Prazek thanks. I will look into it :)
http://reviews.llvm.org/D20365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
madsravn created this revision.
madsravn added reviewers: alexfh, flx.
madsravn added a subscriber: cfe-commits.
This is fix for bug 27802: https://llvm.org/bugs/show_bug.cgi?id=27802
I have added a check to clang-tidy which refrains from putting parantheses
around macros which are variadic.
ht
madsravn created this revision.
madsravn added reviewers: alexfh, flx.
madsravn added a subscriber: cfe-commits.
Patch for bug 27475: https://llvm.org/bugs/show_bug.cgi?id=27475
I used the suggestion of alexfh to check the header extension.
http://reviews.llvm.org/D20512
Files:
clang-tidy/llv
madsravn added inline comments.
Comment at: clang-tidy/llvm/HeaderGuardCheck.h:19
@@ -18,3 +18,3 @@
/// Finds and fixes header guards that do not adhere to LLVM style.
class LLVMHeaderGuardCheck : public utils::HeaderGuardCheck {
hokein wrote:
> You should add
Author: madsravn
Date: Mon May 23 13:06:29 2016
New Revision: 270470
URL: http://llvm.org/viewvc/llvm-project?rev=270470&view=rev
Log:
Commiting for http://reviews.llvm.org/D20365
Modified:
clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp
clang-tools-extra/trunk/test/clan
Author: madsravn
Date: Mon May 23 13:15:40 2016
New Revision: 270472
URL: http://llvm.org/viewvc/llvm-project?rev=270472&view=rev
Log:
Commiting for http://reviews.llvm.org/D20365
Modified:
clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp
clang-tools-extra/trunk/test/clan
madsravn closed this revision.
madsravn added a comment.
Code committed.
http://reviews.llvm.org/D20365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: madsravn
Date: Mon May 23 13:27:05 2016
New Revision: 270473
URL: http://llvm.org/viewvc/llvm-project?rev=270473&view=rev
Log:
Commiting for http://reviews.llvm.org/D20365
Modified:
clang-tools-extra/trunk/clang-tidy/modernize/PassByValueCheck.cpp
clang-tools-extra/trunk/test/clan
iew link at the end
>> of the commit message. If every change just had a phab link as commit
>> message, people bisecting changes would have to click through for every
>> change in `svn log` output.
>>
>> On Mon, May 23, 2016 at 2:15 PM, Mads Ravn via cfe-commits <
&g
madsravn added a comment.
@alexfh I don't know how I could miss that. But I got my commit access and
committed the code myself. Thanks though.
@prazek Yes I reverted. The code made the build server (as seen on IRC) fail.
So I quickly reverted. I'm gonna fix the code tonight - I had to "make cle
Author: madsravn
Date: Tue May 24 10:00:16 2016
New Revision: 270565
URL: http://llvm.org/viewvc/llvm-project?rev=270565&view=rev
Log:
[clang-tidy] modernize-pass-by-value bugfix
Modified the clang-tidy PassByValue check. It now stops adding std::move to
type which is trivially copyable because
Author: madsravn
Date: Tue May 24 10:13:44 2016
New Revision: 270567
URL: http://llvm.org/viewvc/llvm-project?rev=270567&view=rev
Log:
[clang-tidy] modernize-pass-by-value bugfix. Reverting lit-style test
Adding to revision 270565. The lit-style test was wrong. This is being fixed by
this commit
Author: madsravn
Date: Tue May 24 11:09:24 2016
New Revision: 270575
URL: http://llvm.org/viewvc/llvm-project?rev=270575&view=rev
Log:
[clang-tidy] modernize-pass-by-value bugfix. Reverting lit-style test
Adding to revision 270567. The lit-style test was wrong. This is being fixed by
this commit
I'm glad. I'm finally getting the hang of this (I think) :)
Best regards,
Mads Ravn
On Tue, May 24, 2016 at 7:01 PM Renato Golin
wrote:
> On 24 May 2016 at 17:09, Mads Ravn via cfe-commits
> wrote:
> > Author: madsravn
> > Date: Tue May 24 11:09:24 2016
> >
madsravn closed this revision.
madsravn added a comment.
Code committed.
http://reviews.llvm.org/D20510
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
49 matches
Mail list logo