[PATCH] D86533: (Urgent!) [release][docs][analyzer] Add 11.0.0. release notes

2020-08-26 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang/docs/ReleaseNotes.rst:509 + The currently beta-version tool is found in + (llvm-project repository)/clang/utils/analyzer/SATest.py. Let's put this into monospace font too. Otherwise LGTM from a readability

[PATCH] D93222: [RFC][analyzer] Introduce MacroExpansionContext to libAnalysis

2020-12-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang/lib/Analysis/MacroExpansionContext.cpp:22 +: PP(PP), SM(PP.getSourceManager()), LangOpts(LangOpts) { + class MacroExpansionRangeRecorder : public PPCallbacks { +const Preprocessor &PP; xazax.hun wrote:

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

2020-12-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added a reviewer: aaron.ballman. whisperity added a comment. Right, let's bump. I've checked the output of the checker on a set of test projects (our usual testbed, I should say) which contains around 15 projects, half of which was C and the other half C++. All projects were analysed

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

2020-12-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. But of course, after having written all of that, I forgot to upload the results themselves... 😲 F14738535: SuspiciousCall.sqlite Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D20689/n

[PATCH] D69560: [clang-tidy] Add 'experimental-cppcoreguidelines-avoid-adjacent-parameters-of-the-same-type' check

2020-12-16 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Herald added a subscriber: shchenz. In D69560#2319340 , @aaron.ballman wrote: > Congrats on the SCAM acceptance, I hope the presentation goes well! The entire event was amazing, even if short. There was another paper which se

[PATCH] D84176: [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool

2020-09-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D84176#2300488 , @njames93 wrote: > Is this an artefact of how `check-clang-tools` also depends on all > clang-tools-extra targets. Yes, this was not changed in this patch. Fixing that will require a lot more CMake magic w

[PATCH] D91948: [WIP][analyzer][doc] Add Container- and IteratorModeling developer docs

2020-11-23 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In general, perhaps you should go over the rendered text once again and make use of //emph// and **bold** some more. Explanation looks okay from my part, although I'm really not knowledgeable about CSA internals. But there are plenty of "typesetting" issues. Do you h

[PATCH] D91948: [WIP][analyzer][doc] Add Container- and IteratorModeling developer docs

2020-11-23 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Actually, while the explanation is understandable for me with additional knowledge about the representation... I think it would be useful to add the most simple example from the iterator checkers to the end of the document, how this whole thing ties together and how

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

2021-05-31 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. Bump. 🙂 This is the last part that's still unreviewed and also the most complex. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75041/new/ https://reviews.llvm.org/D75041 ___ c

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

2021-06-03 Thread Whisperity via Phabricator via cfe-commits
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->getAs() || RType->getAs()) { +// Unfortun

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

2021-06-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. There was a bit of talk on Twitter recently about strong typing which reminded me of this checker! 😁 I'll fix all issues in one go once we're through with all the comments, I'd like to see the full picture of what needs to be done. Repository: rG LLVM Github Monor

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

2021-06-03 Thread Whisperity via Phabricator via cfe-commits
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->getAs() || RType->getAs()) { +// Unfortun

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

2021-06-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:122 #define FB(Name, K) MIX_##Name = (1ull << (K##ull - 1ull)) martong wrote: > FB stands for FunnyBitmask? Could you please either descri

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

2021-01-26 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 319315. whisperity added a comment. - Added a fallback case to also diagnose when Clang parsed the two types to be canonically the same (we will elaborate a few cases of such equivalences later, such as `typedef`s) - Fixed Clang-Format and Clang-Tidy wa

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

2021-01-27 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:58 + +namespace { + aaron.ballman wrote: > Is there a need for the anonymous namespace? (We typically only use them when > defining a class an

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

2021-01-27 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-len2.cpp:10 + +void declaration(int Param, int Other); // NO-WARN: No chance to change this function. + aaron.ballman wrote: > I think

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

2021-01-28 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 319840. whisperity marked 9 inline comments as done. whisperity added a comment. - NFC Code style and organisation fixes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new/ https://reviews.llvm.org/D695

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

2021-01-28 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:284 +/// The default value for the MinimumLength check option. +static constexpr unsigned DefaultMinimumLength = 2; + aaron.ballman wrote: > It

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

2021-01-30 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added a reviewer: aaron.ballman. whisperity added projects: clang, clang-tools-extra. Herald added subscribers: martong, gamesh411, Szelethus, rnkovacs, xazax.hun. whisperity requested review of this revision. The base patch only deals with strict (cano

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 6 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:255 + std::string NodeTypeName = + Node->getType().getAsString(Node->getASTContext().getPrintingPolicy()); +

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

2021-02-02 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:402-403 + +// Unfortunately, undersquiggly highlights are for some reason chewed up +// and not respected b

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2536570 , @steveire wrote: > I haven't read through all the comments, but the word 'easily' implies > 'desirable'. This check seems to be for finding params which are undesirably > swappable, right? The `easily` was

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity marked an inline comment as done. whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-len2.cpp:10 + +void declaration(int Param, int Other); // NO-WARN: No chance to change this function. + ---

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:402-403 + +// Unfortunately, undersquiggly highlights are for some reason chewed up +// and not respected by diagnostics from Clang-Tidy. :( +diag(F

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-len2.cpp:10 + +void declaration(int Param, int Other); // NO-WARN: No chance to change this function. + aaron.ballman wrote: > whisperi

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/bugprone-easily-swappable-parameters-len2.cpp:10 + +void declaration(int Param, int Other); // NO-WARN: No chance to change this function. + aaron.ballman wrote: > whisperi

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. (Typing this in here so it is not forgotten.) @aaron.ballman suggested in http://reviews.llvm.org/D69560#inline-893813 that a case of argument and parameter swaps could be discovered between forward declarations and the definitions, i.e. void fn(int x, int y);

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

2021-02-02 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:135 void sanitize() { -assert(Flags != MIX_Invalid && "sanitize() called on invalid bitvec"); -// TODO: There will be statements here in further exte

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

2021-02-05 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 6 inline comments as done. whisperity added inline comments. Herald added a subscriber: nullptr.cpp. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:177 + const std::size_t StartIndex) {

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-29 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/VirtualClassDestructorCheck.cpp:26 + ast_matchers::internal::Matcher InheritsVirtualDestructor = + hasAnyBase(hasType(cxxRecordDecl(has(cxxDestructorDecl(isVirtual()); --

[PATCH] D107450: [clang-tidy] Fix wrong FIxIt in performance-move-const-arg

2021-09-29 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:254 + 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] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-09-30 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D110614#3032818 , @carlosgalvezp wrote: > Moved the condition of public-virtual / protected-non-virtual to the check > stage instead of the match stage. This way is more similar to the equivalent > Sema check and it passe

[PATCH] D110614: [clang-tidy] Fix false positives in cppcoreguidelines-virtual-class-destructor

2021-10-04 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D110614#3038519 , @carlosgalvezp wrote: > Hi! Are there any more issues I should address? It would be nice to get it > merged since it fixes quite a few FPs. I'm not seeing anything immediate to add. I like the proper pri

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

2021-02-08 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:177 + const std::size_t StartIndex) { + const std::size_t NumParams = FD->getNumParams(); + assert(StartIndex < NumParam

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D69560#2549959 , @steveire wrote: > Why "easily" instead of "suspicious", "spuriously" or any of the other words > that are already used? The name was @aaron.ballman's idea after we postponed the `experimental-cppcoreguide

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 322339. whisperity added a comment. - Added a C test file with some C-specific language constructs that we may or may not match. - Explained limitations with regards to variadics, templates, etc. better in the docs, and added test cases for these too. - W

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity marked 4 inline comments as done. whisperity added inline comments. Comment at: clang-tools-extra/clang-tidy/bugprone/EasilySwappableParametersCheck.cpp:255 + std::string NodeTypeName = + Node->getType().getAsString(Node->getASTContext().getPrintingPolicy()); +

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 322357. whisperity added a comment. Made detection of macros as "parameter type names" more robust. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new/ https://reviews.llvm.org/D69560 Files: clang-to

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

2021-02-09 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/bugprone/EasilySwappableParametersCheck.cpp:255 + std::string NodeTypeName = + Node->getType().getAsString(Node->getASTContext().getPrintingPolicy()); +

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 322363. whisperity added a comment. **NFC** (With all the restructuring and trying to figure out how to implement the latest change, I managed to upload the wrong, unclean diff...) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 322431. whisperity marked 6 inline comments as done. whisperity added a comment. Herald added a subscriber: nullptr.cpp. - **NFC** Code style, formatting, wording, etc. changes as per review comments. - **NFC** Removed a stale FIXME Repository: rG LLVM

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

2021-02-09 Thread Whisperity via Phabricator via cfe-commits
whisperity created this revision. whisperity added reviewers: aaron.ballman, alexfh, hokein, njames93. whisperity added projects: clang, clang-tools-extra. Herald added subscribers: nullptr.cpp, rnkovacs, xazax.hun. whisperity requested review of this revision. Herald added a subscriber: cfe-commit

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

2021-02-12 Thread Whisperity via Phabricator via cfe-commits
whisperity updated this revision to Diff 323305. whisperity added a comment. Make sure that overloadable binary operators are ignored properly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69560/new/ https://reviews.llvm.org/D69560 Files: clang

[PATCH] D96607: [clang-tidy] Add check 'readability-pointer-type-star-placement'.

2021-02-13 Thread Whisperity via Phabricator via cfe-commits
whisperity added a comment. In D96607#2561287 , @njames93 wrote: > I don't see the use case you suggest as a strong enough motivation for this, > clang-format does this job very well and we shouldn't be reinventing the > wheel here. Can you turn all mec

[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] D76287: [analysis][analyzer] Introduce the skeleton of a reaching definitions calculator

2021-06-03 Thread Whisperity via Phabricator via cfe-commits
whisperity resigned from this revision. whisperity added a comment. Herald added a subscriber: manas. What about this patch? I'm removing my reviewer bit just so it doesn't appear in my list anymore, but if there are any updates, I'll keep myself as a subscriber. 🙂 Repository: rG LLVM Github

[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] 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] 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] 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] 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

<    1   2   3   4   5   6   >