[PATCH] D106442: [clang-tidy] Improve "common type" diagnostic output in 'bugprone-easily-swappable-parameters'

2021-07-21 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added a reviewer: aaron.ballman. whisperity added a project: clang-tools-extra. Herald added subscribers: martong, gamesh411, Szelethus, dkrupp, rnkovacs, xazax.hun. whisperity requested review of this revision. Herald added a subscriber: cfe-commits.

[PATCH] D106361: [clang-tidy] Fix crash and handle AttributedTypes in 'bugprone-easily-swappable-parameters'

2021-07-22 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG473eff1c3057: [clang-tidy] Fix crash and handle AttributedType in 'bugprone-easily-swappable… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables with enum judgement

2021-07-22 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. The problem with enums is that translating //zero// (0, 0.0, nullptr, etc...) to the enum case is not always apparent. A warning **should** always be given. And //if// you can find a zero member in the enum, we can report an automated suggestion for that. To give an

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables with enum judgement

2021-07-22 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D106431#2896334 , @aaron.ballman wrote: > In D106431#2896206 , @whisperity > wrote: > >> The problem with enums is that translating //zero// (0, 0.0, nullptr, >> etc...) to the en

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables with enum judgement

2021-07-22 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D106431#2896441 , @aaron.ballman wrote: > However, I don't recall how clang-tidy interacts with fix-its on notes off > the top of my head, so I'm making an assumption that clang-tidy's automatic > fixit applying mode hand

[PATCH] D106442: [clang-tidy] Improve "common type" diagnostic output in 'bugprone-easily-swappable-parameters'

2021-07-23 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG8b0cc4a65dd4: [clang-tidy] Improve "common type" diagnostic output in 'bugprone-easily… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables with enum judgement

2021-07-27 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D106431#2907002 , @Sockke wrote: > Any thoughts? : ) First, let's first fix that we should still warn for the uninitialised `enum` case, without a FixIt. That's the issue at hand, right now, Clang-Tidy generates, as you

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:156 + + ⁣Added support for initialization check of the scoped enum + Unterminated sequence. Also, where is this feature implemented? CHANGES SINCE LAST ACTION https://revie

[PATCH] D106946: [clang-tidy] Fix crash on "reference to array" parameters in 'bugprone-easily-swappable-parameters'

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added a reviewer: aaron.ballman. whisperity added a project: clang-tools-extra. Herald added subscribers: martong, gamesh411, Szelethus, dkrupp, rnkovacs, xazax.hun. whisperity requested review of this revision. Herald added a subscriber: cfe-commits.

[PATCH] D106946: [clang-tidy] Fix crash on "reference to array" parameters in 'bugprone-easily-swappable-parameters'

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 362333. whisperity added a comment. Add some more test cases! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106946/new/ https://reviews.llvm.org/D106946 Files: clang-tools-extra/clang-tidy/bugprone/Easily

[PATCH] D106946: [clang-tidy] Fix crash on "reference to array" parameters in 'bugprone-easily-swappable-parameters'

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 362334. whisperity added a comment. **NFC** //Typo-fix//: Remove empty line from end of diff. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106946/new/ https://reviews.llvm.org/D106946 Files: clang-tools-

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/docs/ReleaseNotes.rst:156 + + ⁣Added support for initialization check of the scoped enum + whisperity wrote: > Unterminated sequence. Also, where is this feature implemented? @Sockke Sorry if I'm ul

[PATCH] D106946: [clang-tidy] Fix crash on "reference to array" parameters in 'bugprone-easily-swappable-parameters'

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-implicits.cpp:46 + +void crefToArrayTypedefBoth1(const Point2D &VecDescartes, const Point3D &VecThreeD) {} +// NO-WARN: Distinct types.

[PATCH] D106946: [clang-tidy] Fix crash on "reference to array" parameters in 'bugprone-easily-swappable-parameters'

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 362340. whisperity added a comment. Add a test case where the referenced arrays are deduced from template parameters. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106946/new/ https://reviews.llvm.org/D1069

[PATCH] D106946: [clang-tidy] Fix crash on "reference to array" parameters in 'bugprone-easily-swappable-parameters'

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG21832121e112: [clang-tidy] Fix crash on "reference-to-array" parameters in 'bugprone-easily… (authored by whisperity). Repository: rG LLVM Github

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-28 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Alright, thanks! So it does work that way, I didn't know. I think this is okay from my end. You can mark the inline discussion done, by the way. 🙂 Let's see if @aaron.ballman has any comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106431/new/ https:

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. If we are tinkering with the code post-acceptance, could you please also change `const char *` to `StringRef`? They are the same thing essentially, but accessing the length is (AFIAK) //O(1)// and there isn't a //concerning// `strlen` call in the code. CHANGES SINC

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:85 + if (TypePtr->isEnumeralType()) +InitializationString = ""; + else if (TypePtr->isIntegerType()) Also, if we're using //Optional//, this

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp:85 + if (TypePtr->isEnumeralType()) +InitializationString = ""; + else if (TypePtr->isIntegerType()) whisperity wrote: > Also, if we're usin

[PATCH] D89380: [clang-tidy] Fix for cppcoreguidelines-prefer-member-initializer to handle classes declared in macros

2021-07-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D89380#2913664 , @martong wrote: > @baloghadamsoftware Ping. Bug 47778 is marked //FIXED// by D97132 . CHANGES SINCE LAST ACTION https://revi

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-30 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D106431#2916542 , @Sockke wrote: > Cheers! Can it be merged? @aaron.ballman Yes, but I think the patch needs to be rebased first as the pre-merge checks CI system said "patch application failed". Do you have commit access?

[PATCH] D106431: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum FixIt, and add support for initialization check of scoped enum.

2021-07-30 Thread Whisperity via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4a097efe7784: [clang-tidy] Fix cppcoreguidelines-init-variables by removing the enum (authored by Sockke, committed by whisperity). Changed prior t

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/UseAlternativeTokensCheck.h:5-6 +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// This seems to be ve

[PATCH] D107325: [clang-tidy] Fix command line is too long issue which breaks test on Windows

2021-08-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In general, would it be possible to specify the configuration file as a custom path, and not use the hidden filename `.clang-tidy` in an otherwise empty directory? I think there's a `--config` flag on Tidy's interface for giving any file from any path for this. So it

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-04 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 5 inline comments as done. whisperity added a comment. In D75041#2799023 , @martong wrote: > Perhaps all conversion related logic should go into their own implementation > file? Seems like it adds up to roughly 1000 lines. That's agains

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 2 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:657-667 + // Certain kinds unfortunately need to be side-stepped for canonical type + // matching. + if (LType->

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353969. whisperity marked 8 inline comments as done. whisperity added a comment. All changes are **NFC** and styling only. - Remove the `FB` macro in favour of explicitly specifying the bit flag value - Change debug printout from bit pattern to individual

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353972. whisperity added a comment. **NFC**: Rebase & update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736 Files: clang-tools-extra/clang-tidy/bugprone/EasilySw

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353974. whisperity added a comment. **NFC**: Rebase & update. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355 Files: clang-tools-extra/clang-tidy/bugprone/EasilySw

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353975. whisperity marked 5 inline comments as done. whisperity added a comment. **NFC**. - Rebase and update for changes of base patch D69560 . - Remove the `<<=` and `%=` operators in favour of named functions. - Elabora

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353978. whisperity added a comment. **NFC**: Rebase & update. While this patch conceptually only depends on D69560 , the diff itself has become linear during the code review and subsequent updates, and as such, must be ap

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353979. whisperity added a comment. **NFC**: Rebase & update. While this patch conceptually only depends on D69560 , the diff itself has become linear during the code review and subsequent updates, and as such, must be ap

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2747092 , @alexfh wrote: > BTW, any ideas why "patch application failed"? (See the Build status in the > Diff Detail section) I think I figured out why the pre-build CI isn't working... it seems that the fact that t

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 353983. whisperity added a comment. (Try nudging the CI to only apply this commit after removal of parent links.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new/ https://reviews.llvm.org/D69560 Fil

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354166. whisperity added a comment. Attempt to fix build failure on Windows buildbot (`operator new` was taking `unsigned long` instead of `size_t` in a test which resulted in hard error). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354180. whisperity added a comment. (Uploaded the prerequisite, wrong patch here by accident.) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75041/new/ https://reviews.llvm.org/D75041 Files: clang-tools-e

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354183. whisperity added a comment. **NFC** Fix lint. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736 Files: clang-tools-extra/clang-tidy/bugprone/EasilySwappableP

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. //Gentle boop.// Bugzilla is offline for me right now (and rumour has it that it will be completely shut down in the near future), so it would be good to know what is the status of this patch and how it related to the mentioned (and //right now// unavailable) bug rep

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354192. whisperity added a comment. **NC!** Recreate diff to try and get the buildbots running... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355 Files: clang-tool

[PATCH] D90399: [clang-tidy] non-portable-integer-constant check

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Herald added a subscriber: cfe-commits. Comment at: clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp:38 #include "NoEscapeCheck.h" +#include "NonportableintegerconstantCheck.h" #include "NotNullTerminatedResultCheck.h" -

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354203. whisperity added a comment. **NC** Fix lint mishap that occurred during previous rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355 Files: clang-tools

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354210. whisperity added a comment. **NC** Rebase, buildbots, etc. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75041/new/ https://reviews.llvm.org/D75041 Files: clang-tools-extra/clang-tidy/bugprone/Eas

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354218. whisperity added a comment. **NC** Rebase & more buildbot shenanigans so we can get a pass! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78652/new/ https://reviews.llvm.org/D78652 Files: clang-to

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-06-24 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354229. whisperity added a comment. **NC** Rebase and buildbot trigger. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97297/new/ https://reviews.llvm.org/D97297 Files: clang-tools-extra/clang-tidy/bugpron

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-06-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354467. whisperity added a comment. **NFC** Rebase and fix things broken by D104819 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20689/new/ https://reviews.llvm.org/D206

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-25 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2840554 , @aaron.ballman wrote: > This is a very involved check that I think is going to produce some > interesting results for users, thank you for working so diligently on it! I > think all of the patches in the s

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354478. whisperity marked 5 inline comments as done. whisperity added a comment. **NFC** Fix nits. Let's have one final run with the buildbots, just in case. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75041/new/ https://reviews.llvm.org/D7504

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-25 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:249 + /// the conversion sequence. This method does **NOT** return Begin and End. + SmallVector getInvolvedTypesInSequence() const { +SmallVector Ret; ---

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-02-19 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 325036. whisperity retitled this revision from "[clang-tidy] Add "ignore related parameters" heuristics to 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type'" to "[clang-tidy] Suppress reports to similarly used parameters in 'bug

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-02-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 325705. whisperity removed a reviewer: zporky. whisperity added a comment. - Fixed an issue of the //"same function"// heuristic that blew up if functions are forward declared. - **[NFC]** Optimised "relatedness" is to be checked first (as it's a trivial

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-02-23 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: aaron.ballman, alexfh, hokein, JonasToth. whisperity added projects: clang, clang-tools-extra. Herald added subscribers: gamesh411, Szelethus, rnkovacs, xazax.hun. whisperity requested review of this revision. While the original check's

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-02-23 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 325799. whisperity added a comment. - **[NFC]** Realised I forgot to add the new option to the check's documentation. This is fixed now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97297/new/ https://revi

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-02-24 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D97297#2583391 , @Eugene.Zelenko wrote: > Please mention new option in Release Notes. The base check is not yet accepted or in. I plan to land the entire thing in one go once everything is accepted because a partial landin

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 326439. whisperity added a comment. - **[NFC]** Reformat the documentation so option values are in single backticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new/ https://reviews.llvm.org/D69560

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 326440. whisperity added a comment. - **[NFC]** Reformat the documentation so option values are in single backticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 326441. whisperity added a comment. - **[NFC]** Reformat the documentation so option values are in single backticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm.org/D96355

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 326442. whisperity marked 2 inline comments as done. whisperity added a comment. - **[NFC]** Reformat the documentation so option values are in single backticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-02-25 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 326443. whisperity added a comment. - **[NFC]** Reformat the documentation so option values are in single backticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D78652/new/ https://reviews.llvm.org/D78652

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-03-03 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 327743. whisperity retitled this revision from "[clang-tidy] Approximate implicit conversion issues in 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type'" to "[clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixabil

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-03-03 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 327761. whisperity added a comment. After reading through the diff as rendered by Phabricateur, I realised I left in a few crappy debug prints and commented-out values that are not needed in the end. This is fixed now. CHANGES SINCE LAST ACTION https:

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-03-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @aaron.ballman I've reworked and uploaded the final addition to this line, the crown jewel, the very reason this checker was developed (D75041 ). So, AFAIK, the "let's rewrite the whole thing with better code quality" work can be cons

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-04-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Ping! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98635/new/ https://reviews.llvm.org/D98635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG3b677b81cec7: [libtooling][clang-tidy] Fix diagnostics not highlighting fed SourceRanges (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.o

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336618. whisperity set the repository for this revision to rG LLVM Github Monorepo. whisperity added a comment. Rebased over D98635 , allowing us to properly highlight the found //"mixable adjacent parameter range"// (assum

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336619. whisperity added a comment. **[NFC]** Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95736/new/ https://reviews.llvm.org/D95736 Files: clang-tools-extra/clang-tidy/bugprone/EasilySwappableP

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336620. whisperity set the repository for this revision to rG LLVM Github Monorepo. whisperity added a comment. **[NFC]** Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96355/new/ https://reviews.llvm

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336622. whisperity added a comment. Made sure that the parameter's name is highlighted promptly in the //"first|last parameter of the range is..."// note. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336623. whisperity set the repository for this revision to rG LLVM Github Monorepo. whisperity added a comment. - Fixed a few nits. - Rebased, and added highlighting (under-squiggly) the parameter/return type of conversion operators for extra emphasis. R

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 336625. whisperity edited the summary of this revision. whisperity added a comment. Rebase over D98635 . Highlighting only the parameter's name, not the entire range of the parameter. Repository: rG LLVM Github Monorepo

[PATCH] D89649: Fix __has_unique_object_representations with no_unique_address

2021-04-14 Thread Whisperity via Phabricator via cfe-commits
whisperity added subscribers: dblaikie, erik.pilkington, martong, whisperity. whisperity added a reviewer: shafik. whisperity added a comment. Adding a few subscribers I could find from the original bugzilla entry, + perhaps a few reviewers to help us. CHANGES SINCE LAST ACTION https://review

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-19 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. @aaron.ballman @alexfh Bump! How shall we move further? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20689/new/ https://reviews.llvm.org/D20689 ___ cfe-commits mailing list c

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG499e39c5983d: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new

[PATCH] D95736: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and `const &` diagnostics

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG26d864b44b9d: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with `typedef` and… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D96355: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally considering differently qualified types mixable

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG961e9e6af65e: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with optionally… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D75041: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability because of implicit conversions

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe33d0478831e: [clang-tidy] Extend 'bugprone-easily-swappable-parameters' with mixability… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D78652: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily-swappable-parameters'

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb9ece0346112: [clang-tidy] Suppress reports to similarly used parameters in 'bugprone-easily… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D97297: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone-easily-swappable-parameters'

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0fba450b9756: [clang-tidy] Suppress reports to patternedly named parameters in 'bugprone… (authored by whisperity). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 12 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:408-409 + + bool IsParamContinuouslyConst = + !IsParamReference || ParamType.getNonReferenceType().isConstQu

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
whisperity marked an inline comment as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/SuspiciousCallArgumentCheck.cpp:694-695 + + for (std::size_t I = 0, E = CalleeFuncDecl->getNumParams(); I != E; ++I) { +if (const auto *Param

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354856. whisperity marked 2 inline comments as done. whisperity added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. - Fix comments and code according to comments - Turned `Substring` into a case-insensitive heuristic. - A

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-06-28 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 354867. whisperity added a comment. **NFC** Fix `ReleaseNotes` entry getting out of place during rebases earlier. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20689/new/ https://reviews.llvm.org/D20689 Fil

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-06-29 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 2 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:113-120 +#define FB(Name, K) MIX_##Name = (1ull << (K##ull - 1ull)) + + FB(None, 1), //< Mix between the two

[PATCH] D92777: [clang-tidy] Add bugprone-strlen-in-array-index checker

2021-07-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. The tests are a bit slim. We definitely need more cases... what if the array isn't allocated locally, but received as a parameter? I take that we need both an `fgets` and a `strlen` call in the same function(?) to emit diagnostics. Are we sure it will work if the arr

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-07-13 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Bump. 🙂 I would prefer this check to be able to go into Clang-Tidy 13 if it's okay, together with the other check I implemented. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20689/new/ https://reviews.llvm.org/D20689

[PATCH] D107294: [clang-tidy] adds warning to suggest users replace symbols with words

2021-08-05 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/AlternativeTokensCheck.cpp:61 +FixItHint AlternativeTokensCheck::createReplacement(SourceLocation Loc, +StringRef S, int N) const { + // On

[PATCH] D107450: [clang-tidy] Fix wrong and missing warnings in performance-move-const-arg

2021-08-05 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/MoveConstArgCheck.cpp:51 + hasReturnValue(anyOf( + ignoringImplicit(ignoringParenCasts(MoveCallMatcher)), + cxxConstructExpr(hasDeclaration(cxxConstructorDecl

[PATCH] D107450: [clang-tidy] Fix wrong and missing warnings in performance-move-const-arg

2021-08-05 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/performance-move-const-arg.cpp:261 + showInt(std::move(a)); + // CHECK-MESSAGES: :[[@LINE-1]]:11: warning: std::move of the variable 'a' of the trivially-copyable type 'int' has no effect

[PATCH] D107900: [clang-tidy] Add a new clang-tidy check for trivially copyable types passed by const reference

2021-08-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/misc/PodConstRefToValueCheck.h:18-25 +/// The check detects when trivially_copyable types are passed by +/// const-reference to a function and changes that to by value +// +// RestrictToBuiltInTypes: if t

[PATCH] D107873: [clang-tidy] adds a const-qualified parameter check

2021-08-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/performance/ConstParameterValueOrRef.cpp:73 + + const QualType &T = Param.getType(); + QualType is small (AFAIK it's just 2 pointers), no need for a reference on this, it can live on th

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-08-24 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 3 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:57 + "Const_Reverse_Iterator", + "const_reverse

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-22 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 339533. whisperity edited the summary of this revision. whisperity added a comment. - **NFC** Fix lint of header guard nomenclature - **NFC** Tear out obsolete `LLVM_DEBUG` calls from the implementation Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-04-22 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 339625. whisperity added a comment. **NFC** Fix the header guard name lint again, hopefully to the proper value this time. I forgot the `CHECK` out of it... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D2068

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-05-10 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2747092 , @alexfh wrote: > BTW, any ideas why "patch application failed"? (See the Build status in the > Diff Detail section) > > It would be really nice to get pre-merge checks to work for the patch. Put simply, I t

[PATCH] D20689: [clang-tidy] Add 'readability-suspicious-call-argument' check

2021-03-10 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 329666. whisperity edited the summary of this revision. whisperity added reviewers: hokein, njames93. whisperity added a comment. - Massively refactored and modernised the implementation - Removed spaghetti code related to the check options and made their s

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not handlings SourceRange highlights

2021-03-15 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: aaron.ballman, njames93. whisperity added projects: clang, clang-tools-extra. Herald added subscribers: martong, gamesh411, Szelethus, dkrupp, rnkovacs, xazax.hun. whisperity requested review of this revision. Herald added a subscriber:

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not handlings SourceRange highlights

2021-03-15 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 330687. whisperity added a comment. **NFC** I originally wrote a Release Notes entry about this, which I forgot to commit before I generated the patch file I uploaded, this is fixed now. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-15 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D98635#2626455 , @aaron.ballman wrote: > It looks like there are some unit test failures from the change: > https://buildkite.com/llvm-project/premerge-checks/builds/29754#a9b04ab5-e326-4ff1-beea-773f21a33349 Strange becau

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-15 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D98635#2626464 , @whisperity wrote: > Strange because I specifically ran both `check-clang` **and** > `check-clang-tools` locally, but will look into this. Turns out there is a `check-clang-extra-unit` too, and it looks lik

[PATCH] D98635: [libtooling][clang-tidy] Fix diagnostics not respecting and highlighting fed SourceRanges

2021-03-15 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 330737. whisperity edited the summary of this revision. whisperity added a subscriber: compositeprimes. whisperity added a comment. Fixed a test file that I originally missed to align with the changes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D69560: [clang-tidy] Add 'bugprone-easily-swappable-parameters' check

2021-03-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:56 + +#ifndef NDEBUG + aaron.ballman wrote: > Are you planning to remove the debugging code now that the check is > approaching its final form

<    1   2   3   4   5   6   >