Page MenuHomePhabricator

mikecrowe (Mike Crowe)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 5 2023, 7:06 AM (6 w, 6 d)

Recent Activity

Mon, Mar 13

mikecrowe updated the diff for D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.

Quote types and functions correctly in redundant-string-cstr.rst.

Mon, Mar 13, 1:15 AM · Restricted Project, Restricted Project
mikecrowe updated the summary of D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.
Mon, Mar 13, 12:01 AM · Restricted Project, Restricted Project
mikecrowe updated the diff for D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.

Documentation updates suggested by @PiotrZSL. Rebase.

Mon, Mar 13, 12:00 AM · Restricted Project, Restricted Project

Sun, Mar 12

mikecrowe added a comment to D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.

My only complain is documentation, changes in code and tests are correct.
Build failed mainly due to conflicts in previous change.
It should get green once prev patch will land, and this will be re-based.

Sun, Mar 12, 2:44 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.

Rebase.

Sun, Mar 12, 2:34 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

Rebase. No conflicts.

Sun, Mar 12, 2:33 PM · Restricted Project, Restricted Project
mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

Thank you for your patience.

Sun, Mar 12, 2:15 PM · Restricted Project, Restricted Project
mikecrowe updated the summary of D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Sun, Mar 12, 2:12 PM · Restricted Project, Restricted Project
mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

Correct commit message and this could land.

Sun, Mar 12, 2:01 PM · Restricted Project, Restricted Project
mikecrowe added inline comments to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Sun, Mar 12, 1:46 PM · Restricted Project, Restricted Project
mikecrowe added a comment to D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.

I can squash this with https://reviews.llvm.org/D143342 if required.

Sun, Mar 12, 1:45 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145885: [clang-tidy] Support readability-redundant-string-cstr.StringParameterFunctions option.
Sun, Mar 12, 1:44 PM · Restricted Project, Restricted Project
mikecrowe added inline comments to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Sun, Mar 12, 10:11 AM · Restricted Project, Restricted Project

Sat, Mar 11

mikecrowe added inline comments to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Sat, Mar 11, 12:29 PM · Restricted Project, Restricted Project
mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

Code is fine, probably If would would write this, then I would bother to split into C++20 and C++2B simply because std::print wouldn't compile if it wouldn't be available. So I would just use hasAnyName.
But code looks fine, configuration could be added later...

Sat, Mar 11, 10:28 AM · Restricted Project, Restricted Project
mikecrowe added inline comments to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Sat, Mar 11, 9:45 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D145311: [clang-tidy][NFC] Make abseil-redundant-strcat-calls checker use <string> header.

It's fine, absl::StrCat returns std::string.
So those changes are correct.

Sat, Mar 11, 9:34 AM · Restricted Project, Restricted Project

Fri, Mar 10

mikecrowe added a comment to D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705.

Thanks, and sorry about the erroneous [PATCH] in the summary. :(

Fri, Mar 10, 6:04 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705.

Thanks for the speedy re-review. I don't have commit permission, so please can you land this if you are happy to do so?

Fri, Mar 10, 5:36 AM · Restricted Project, Restricted Project
mikecrowe retitled D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705 from [clang-tidy] readability-redundant-string-cstr for smart pointer #576705 to [PATCH] [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705.
Fri, Mar 10, 5:32 AM · Restricted Project, Restricted Project
mikecrowe updated the diff for D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705.

Fix comment in code as suggested by PiotrZSL. Improve lit check tests.

Fri, Mar 10, 5:30 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705.

Also consider reducing commit message, instead just copying issue description.
Simple description about issue would be sufficient.

Fri, Mar 10, 5:08 AM · Restricted Project, Restricted Project

Thu, Mar 9

mikecrowe requested review of D145730: [clang-tidy] Fix readability-redundant-string-cstr for smart pointer #576705.
Thu, Mar 9, 1:40 PM · Restricted Project, Restricted Project
mikecrowe added a comment to D145313: [clang-tidy] Make readability-container-size-empty check using <string> header.

Now a descendent of D145724.

Thu, Mar 9, 12:55 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D145313: [clang-tidy] Make readability-container-size-empty check using <string> header.

Upload using arc diff so more context is available.

Thu, Mar 9, 12:54 PM · Restricted Project, Restricted Project
mikecrowe added inline comments to D145312: [clang-tidy] Make readability-string-compare check use <string> header.
Thu, Mar 9, 12:51 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145724: [clang-tidy] Provide default template arguments in <string>.
Thu, Mar 9, 12:50 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D145311: [clang-tidy][NFC] Make abseil-redundant-strcat-calls checker use <string> header.

Re-upload using arc.

Thu, Mar 9, 12:42 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D145310: [clang-tidy] Make readability-container-data-pointer use <string> header.

Rebase on top of fb7ef637a84652dbd3d973a1ba7db9470181b5aa (which is a
descendent of ae25e2f19decb94198301f0726ee613f945cc405 aka D144216, on
which this change relies.)

Thu, Mar 9, 12:40 PM · Restricted Project, Restricted Project
mikecrowe abandoned D145719: [clang-tidy] Make readability-container-data-pointer use <string> header.

Whoops. I accidentally uploaded https://reviews.llvm.org/D145719 as a new change. :(

Thu, Mar 9, 12:32 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145719: [clang-tidy] Make readability-container-data-pointer use <string> header.
Thu, Mar 9, 12:31 PM · Restricted Project, Restricted Project

Sun, Mar 5

mikecrowe added a comment to D145313: [clang-tidy] Make readability-container-size-empty check using <string> header.

Could you upload the patch with full context? I believe you need to do something like git show HEAD -U999999 as per the guidelines. Otherwise arc diff should do the job automatically. Reason I ask is that I cannot see the new line numbers referred to by the note comments - Phab says "Context not available".

Sun, Mar 5, 9:54 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

I will double check that this is true once my current build is complete.

Yes, it's true. I stuck a #error in clang-tools-extra/test/clang-tidy/checkers/Inputs/Headers/string.h and I saw the expected error from a file including <string>.

Awesome, thanks for checking, I wasn't aware we already had string.h. Then if we do have headers named the same as the standard headers, would it make sense to name this header cstring instead of string?

Sun, Mar 5, 9:13 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

I will double check that this is true once my current build is complete.

Sun, Mar 5, 8:20 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

The purpose of this header is to not include any standard header, and yet this is done in line 5 so it kinda defeats the purpose.

Sun, Mar 5, 8:17 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

Sounds good, should we land this?

Sun, Mar 5, 7:51 AM · Restricted Project, Restricted Project

Sat, Mar 4

mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

The changes that extend the <string> header further and use it in a few more checks are:

Sat, Mar 4, 1:15 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145313: [clang-tidy] Make readability-container-size-empty check using <string> header.
Sat, Mar 4, 1:11 PM · Restricted Project, Restricted Project
mikecrowe retitled D145311: [clang-tidy][NFC] Make abseil-redundant-strcat-calls checker use <string> header from Make abseil-redundant-strcat-calls checker use <string> header to [clang-tidy] Make abseil-redundant-strcat-calls checker use <string> header.
Sat, Mar 4, 1:09 PM · Restricted Project, Restricted Project
mikecrowe updated the summary of D145312: [clang-tidy] Make readability-string-compare check use <string> header.
Sat, Mar 4, 1:09 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145312: [clang-tidy] Make readability-string-compare check use <string> header.
Sat, Mar 4, 1:09 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145311: [clang-tidy][NFC] Make abseil-redundant-strcat-calls checker use <string> header.
Sat, Mar 4, 1:07 PM · Restricted Project, Restricted Project
mikecrowe updated the summary of D145310: [clang-tidy] Make readability-container-data-pointer use <string> header.
Sat, Mar 4, 1:05 PM · Restricted Project, Restricted Project
mikecrowe requested review of D145310: [clang-tidy] Make readability-container-data-pointer use <string> header.
Sat, Mar 4, 1:04 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

This new version uses size_t and size_type rather than the annoyingly-named "size" type that the old implementation in redundant-string-cstr.cpp used and is the basis for using the new <string> header in four further checks to be submitted as separate changes.

Sat, Mar 4, 1:01 PM · Restricted Project, Restricted Project

Feb 17 2023

mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

Fair enough! I think we should merge this patch as is first, so that people can benefit from it already, and work through the technical debt afterwards.

Feb 17 2023, 9:45 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

If you're suggesting that I could use the new <string> header to replace declarations of basic_string etc. in other tests then I think that would be possible with some careful checking to make sure it include the necessary functionality. I think that would easier to review separately rather than in a single patch though.

Feb 17 2023, 9:08 AM · Restricted Project, Restricted Project
mikecrowe added a comment to D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.

May be you could use heard in other test in same patch?

Feb 17 2023, 8:20 AM · Restricted Project, Restricted Project

Feb 16 2023

mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

I ended up splitting out the std::format and std::print tests to their own file which meant that I didn't need to modify the existing redundant-string-cstr.cpp file in this commit. (Though of course I had to extract the <string> header in D144216 first.) Let me know if you don't like the split.

Feb 16 2023, 1:57 PM · Restricted Project, Restricted Project
mikecrowe updated the diff for D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Feb 16 2023, 1:52 PM · Restricted Project, Restricted Project
mikecrowe requested review of D144216: [clang-tidy] Extract string header from redundant-string-cstr checker.
Feb 16 2023, 1:47 PM · Restricted Project, Restricted Project

Feb 15 2023

mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

Thanks for the review and further suggestions.

Feb 15 2023, 8:40 AM · Restricted Project, Restricted Project

Feb 12 2023

mikecrowe updated the summary of D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Feb 12 2023, 7:11 AM · Restricted Project, Restricted Project
mikecrowe updated the diff for D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

Incorporate feedback from Nathan James:

Feb 12 2023, 7:09 AM · Restricted Project, Restricted Project
mikecrowe added inline comments to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Feb 12 2023, 4:45 AM · Restricted Project, Restricted Project

Feb 10 2023

mikecrowe added inline comments to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Feb 10 2023, 3:27 AM · Restricted Project, Restricted Project

Feb 6 2023

mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

The limitation about only transforming the first argument can be alleviated by using the forEachArgumentWithParam matcher

Feb 6 2023, 6:09 AM · Restricted Project, Restricted Project

Feb 5 2023

mikecrowe updated the diff for D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

carlosgalvezp wrote:

Please document change in Release Notes, as well as in the check documentation, together with its limitations (can only handle 1 argument at a time).

Feb 5 2023, 12:16 PM · Restricted Project, Restricted Project
mikecrowe added a comment to D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.

This check can also work trivially for fmt::format and fmt::print[1] too (in fact, that's what I'm actually using), if the project would allow them to be added too.

Feb 5 2023, 8:02 AM · Restricted Project, Restricted Project
mikecrowe requested review of D143342: [clang-tidy] Support std::format and std::print in readability-redundant-string-cstr.
Feb 5 2023, 7:19 AM · Restricted Project, Restricted Project