[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-01-12 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#1815916 , @Eugene.Zelenko wrote: > In D54943#1815912 , @0x8000- > wrote: > > > As an aside, once this is merged in, I dream of a "fix-it" for old style C > > code: > > >

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-09-22 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Master branch has too many false positives for tidy - would it be possible to create a branch that contains this patch set on top of llvm-11.0-rc3? I would then add this to our internal CI. For the legacy code (see previous reports) we found quite a few false posit

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-09-23 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#2289410 , @JonasToth wrote: > In D54943#2289037 , @0x8000- > wrote: > >> Master branch has too many false positives for tidy - would it be possible >> to create a branch

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-09-23 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#2290713 , @AlexanderLanin wrote: >> Could you please provide me a full reproducer (optimally without >> dependencies on includes/libraries)? > > I can certainly do that based on my old version from ~9 months ago or

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-09-24 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#2291969 , @JonasToth wrote: > @AlexanderLanin @0x8000- i created the branch `release-11-const` > (https://github.com/JonasToth/llvm-project/tree/release-11-const) in my fork. > > This branch is based on 11-rc3 an

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-09-29 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#2292377 , @0x8000- wrote: > In D54943#2291969 , @JonasToth wrote: > >> @AlexanderLanin @0x8000- i created the branch `release-11-const` >> (https://github.com/JonasTot

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2020-10-24 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Would it be possible to split this review further, into "checking" and "fixing" portions? I understand that fix-it portion is more difficult, and sometimes results in multiple 'const' keywords being added, but for the past year we have used the check as part of regu

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-01-31 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D69764#2532952 , @sammccall wrote: > In D69764#2532666 , @MyDeveloperDay > wrote: > >>> What can be done to move this change along? >> >> I feel there has to be a fundamental accepta

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-03 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Ping? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-07 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added a comment. Added regex for exception names and rebased onto current 'main' branch. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:136 +CheckFactories.registerCheck( +"re

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-07 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 364997. 0x8000- added a comment. Added separate check for parameter names. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-too

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2021-08-08 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#2933179 , @JonasToth wrote: > In D54943#2633408 , @tiagoma wrote: > >> Can we get this in? I work in Microsoft Office and we have been using this >> checker and it works great

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-08 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 365016. 0x8000- added a comment. Updated documentation for all options. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-09 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:136 +CheckFactories.registerCheck( +"readability-variable-length"); } aaron.ballman wro

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-10 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp:136 +CheckFactories.registerCheck( +"readability-variable-length"); } aaron.ballman wrote: > 0x8000- wrote: > > aaron.ballman wro

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-10 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 365622. 0x8000- added a comment. Rebased on main and renamed from readability-variable-length to readability-identifier-length. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-e

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-10 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 365651. 0x8000- added a comment. Clean diff against origin/main CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-extra/cl

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 365852. 0x8000- added a comment. Removed extra 'const' and parentheses that are not congruent with the accepted code style. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-extra

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. @aaron.ballman - thank you for the review; please submit on my behalf. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 365879. 0x8000- added a comment. Reformatted the test file. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-extra/clang-

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-11 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 365891. 0x8000- added a comment. One more format nit. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ https://reviews.llvm.org/D97753 Files: clang-tools-extra/clang-tidy/readability/CMakeLists.txt clang-tools-extra/clang-tidy/r

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-08-12 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. The diff was generated with format-patch, so can be applied with "git am". The envelope: > commit d98d336b452876cfbc32ad1b76319912c45b646b (HEAD -> > readability-variable-name-length-main) > Author: Florin Iucha > Date: Mon Mar 1 00:57:01 2021 -0500 > > Add a c

[PATCH] D54943: WIP [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2021-08-13 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Using the checker now in our production BuildBot - no crashes and no false positives. Can't say if there are false negatives, but at any rate the checker is better than most colleagues at finding what should be declared const. Repository: rG LLVM Github Monorepo

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-07-05 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Is it possible to have this rebased on top of LLVM12 for those of us who find the trade-offs acceptable? I prefer a consistent formatting of const placement, and my code base does not have issues with the macros - if we find one that break the build, I'll suggest it

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2021-07-05 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D69764#2858656 , @MyDeveloperDay wrote: > Rebase on clang12 as requested Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69764/new/ https://reviews.llvm.org/D69764 _

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 10 inline comments as done. 0x8000- added a comment. @Eugene.Zelenko and @njames93 Thank you both for the kind and thoughtful feedback. I am incorporating all recommended changes. First step are all the smaller scope comments, with regex support in a follow-up commit. I

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 327649. 0x8000- added a comment. Addressed most of the review comments with the exception of switching to regex for ignoring loop counters; this change is in the follow-up review. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ htt

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: clang-tools-extra/docs/clang-tidy/checks/readability-variable-length.rst:9 + +Loop counter variables are expected to have a length of at least +`MinimumLoopCounterNameLength` characters

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 327653. 0x8000- marked an inline comment as done. 0x8000- added a comment. Use regular expression for filtering out loop counter variables to ignore. Fully document the options. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97753/new/ h

[PATCH] D97753: [clang-tidy] Add a check for enforcing minimum length for variable names

2021-03-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 327655. 0x8000- added a comment. Add an option "IgnoredVariableNames" that allows filtering out acceptable variable names (similar to the loop counters); also implemented via regex. Added tests for the IgnoredVariableNames option. CHANGES SINCE LAS

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2019-12-02 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Thank you for rebasing on current master. I have ran it today on our code base and found three classes of false positives: 1. Writing to a bitfield of a struct. The struct still is suggested it should be const. 2. Using a variable with an ostream extraction; like "i

[PATCH] D45444: [clang-tidy] implement new check for const-correctness

2019-12-03 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D45444#1766852 , @JonasToth wrote: > > Thank you for testing, I would appreciate if you test later versions, too! > I will focus on landing the utility function for adding `const` first. I > noticed false positives in

[PATCH] D71043: Exclude bitfield definitions from magic numbers check

2019-12-04 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- created this revision. 0x8000- added reviewers: JonasToth, lebedev.ri, aaron.ballman, alexfh. Herald added a project: clang. Herald added a subscriber: cfe-commits. 0x8000- removed a reviewer: lebedev.ri. 0x8000- edited projects, added clang-tools-extra; removed clang. 0x800

[PATCH] D67265: [clang-tidy] Magic number checker shouldn't warn on user defined string literals

2019-12-08 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. Herald added a subscriber: mgehre. @aaron.ballman - can you please review this patch and if you find it acceptable please integrate it? Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67265/new/ https://reviews.llvm.org/

[PATCH] D71686: Fix false positive in magic number checker

2019-12-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- created this revision. 0x8000- added a reviewer: aaron.ballman. 0x8000- added a project: clang-tools-extra. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix false positive in magic number checker https://bugs.llvm.org/show_bug.cgi?id=40640: cppcoregu

[PATCH] D71686: Fix false positive in magic number checker

2019-12-18 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:127 + +// Ignore this instance, because this matches an +// expanded class e

[PATCH] D71686: Fix false positive in magic number checker

2019-12-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 234818. 0x8000- edited the summary of this revision. 0x8000- added a comment. Update release notes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 Files: clang-tools-extra/clang-tidy/readabili

[PATCH] D71686: Fix false positive in magic number checker

2019-12-19 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 234819. 0x8000- added a comment. Fix typo. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 Files: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp clang-tools-extra/docs/ReleaseNote

[PATCH] D71686: Fix false positive in magic number checker

2019-12-20 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:129 +// expanded class enumeration value. +if (Parent.get()) +

[PATCH] D71686: Fix false positive in magic number checker

2019-12-20 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp:129 +// expanded class enumeration value. +if (Parent.get()) +

[PATCH] D71686: Fix false positive in magic number checker

2019-12-20 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 234998. 0x8000- added a comment. Add a test file for expected failures CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 Files: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cpp clang-

[PATCH] D71686: Fix false positive in magic number checker

2019-12-20 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked an inline comment as done. 0x8000- added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/readability-magic-numbers-todo.cpp:9 +{ + if (((int)4) > ProcessSomething(10)) + // CHECK-MESSAGES: :[[@LINE-1]]:13: warning: 4 is a magic nu

[PATCH] D71686: Fix false positive in magic number checker

2019-12-21 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. My take: this change fixes a user-reported bug, and does not cause any known regressions. I think we should integrate this. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 _

[PATCH] D71686: Fix false positive in magic number checker

2019-12-22 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D71686#1794330 , @aaron.ballman wrote: > In D71686#1794053 , @0x8000- > wrote: > > > My take: this change fixes a user-reported bug, and does not cause any > > known regression

[PATCH] D71686: Fix false positive in magic number checker

2019-12-22 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- marked 2 inline comments as done. 0x8000- added a comment. In D71686#1794366 , @aaron.ballman wrote: > In D71686#1794360 , @0x8000- > wrote: > > > In D71686#1794330

[PATCH] D71686: Fix false positive in magic number checker

2019-12-22 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- updated this revision to Diff 235060. 0x8000- added a comment. Minor comment fixes; capitalization, full stop. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 Files: clang-tools-extra/clang-tidy/readability/MagicNumbersCheck.cp

[PATCH] D71686: Fix false positive in magic number checker

2019-12-22 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. @aaron.ballman updated as suggested; please commit/integrate when you have a moment. Thank you! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71686/new/ https://reviews.llvm.org/D71686 ___ cfe-commits mailing l

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-01-31 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-const-correctness-transform-pointer-as-values.cpp:12 + // CHECK-MESSAGES: [[@LINE-1]]:3: warning: variable 'p_local0' of type 'double *' can be declared 'const' + // CH

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-01-13 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. +1 Let's get this in :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2021-10-07 Thread Florin Iucha via Phabricator via cfe-commits
0x8000- added a comment. In D54943#3048763 , @JonasToth wrote: > ping Hi Jonas, Using patch32 in production (on top of "release/13.x" branch) ever since it was made available. No crashes. Only one false positive reported, which I'm not sure even is

<    1   2