[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2019-12-12 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. I have developed a related check in D69560 . That one considers types, but is an //interface rule// checker, and does not consider (any) potential call sites. Moreover, it does not consider "swaps" that happen across a function call,

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-12-19 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. Sorry, I lost this patch. I've looked at the results and it still seems that the signal-to-noise ratio is quite low. There's definitely potential in using parameter name and argument spelling to detect possibly swapped arguments, and there's a recent research on this top

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-10-06 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added a comment. @alexfh, have you had a chance to look at the results yet? https://reviews.llvm.org/D20689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-09-22 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added a comment. I attached the results of the tests. The warnings are categorized into false positives and renaming opportunities. F5376033: PostgreSQL F5376032: FFmpeg F5376031: LLVM

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-09-21 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh added a comment. In https://reviews.llvm.org/D20689#871947, @barancsuk wrote: > @alexfh, would you mind taking a look at the changes that have been > introduced in the new patch? > > The main improvements are: > > - The checker has been shifted to the module `readability`. > - It is c

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-09-15 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk added a comment. @alexfh, would you mind taking a look at the changes that have been introduced in the new patch? The main improvements are: - The checker has been shifted to the module `readability`. - It is checked, whether implicit type conversion is possible from the argument to

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-09-05 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 113830. barancsuk added a comment. Check if argument and parameter numbers differ, add test cases for functions with default parameters https://reviews.llvm.org/D20689 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/ReadabilityTid

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-08-31 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk updated this revision to Diff 113376. barancsuk added a comment. Major changes that have been made since the last update are as follows: - It is checked, whether implicit type conversion is possible from the argument to the other parameter. The following conversion rules are considered

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-08-31 Thread Barancsuk Lilla via Phabricator via cfe-commits
barancsuk commandeered this revision. barancsuk added a reviewer: varjujan. barancsuk added a comment. Herald added a subscriber: baloghadamsoftware. Since the previous author, @varjujan is not available anymore, I take over the role of the author of this revision. https://reviews.llvm.org/D206

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-02-08 Thread Varju Janos via Phabricator via cfe-commits
varjujan added a comment. @xazax.hun Yes I do. Obviously some of them seem to be better than the others so I can remove a couple if needed. https://reviews.llvm.org/D20689 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.or

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-02-06 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added a comment. I think this might be better as a readability checker to find misleading variable or parameter names. It would also be great to consider types. Unfortunately it probably means reimplementing some of the logic from Sema, since that information is not available at this

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-01-03 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh requested changes to this revision. alexfh added a comment. This revision now requires changes to proceed. In https://reviews.llvm.org/D20689#633889, @varjujan wrote: > I ran the check on multiple projects and tried to categorize the warnings: > real errors, false positives, naming errors

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-01-03 Thread Varju Janos via Phabricator via cfe-commits
varjujan added a comment. I ran the check on multiple projects and tried to categorize the warnings: real errors, false positives, naming errors and coincidences. The results are attached. I got no warnings on LLVM. F2902037: postgres F2902036: linuxKernel <

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2017-01-03 Thread Varju Janos via Phabricator via cfe-commits
varjujan updated this revision to Diff 82859. varjujan added a comment. Herald added subscribers: JDevlieghere, mgorny. I have implemented some more heuristics to achieve better results. https://reviews.llvm.org/D20689 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2016-06-03 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D20689#443266, @varjujan wrote: > Yes, I did. The results from running the checker on LLVM are in the attached > file. Sadly, I could'nt find any real mistakes but as I wrote in the summary, > false positives can still indicate bad naming conve

Re: [PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2016-05-29 Thread Varju Janos via cfe-commits
varjujan added a comment. Yes, I did. The results from running the checker on LLVM are in the attached file. Sadly, I could'nt find any real mistakes but as I wrote in the summary, false positives can still indicate bad naming convention for some variables. F1991684: result.txt

Re: [PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2016-05-27 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for the new check! Before starting with the review, I'd like to clarify one important thing. It's not immediately obvious that the pattern the check detects is actually a good indicator of a programming mistake. Did you try to run the check on a large enough c

[PATCH] D20689: [clang-tidy] Suspicious Call Argument checker

2016-05-26 Thread Varju Janos via cfe-commits
varjujan created this revision. varjujan added a reviewer: alexfh. varjujan added subscribers: xazax.hun, cfe-commits. This checker finds those function calls where the function arguments are provided in an incorrect order. It compares the name of the given variable to the argument name in the f