Page MenuHomePhabricator
Feed Advanced Search

Yesterday

njames93 added inline comments to D83224: [clangd] Move clang-tidy check modifications into ClangdServer.
Tue, Aug 11, 5:33 PM · Restricted Project
njames93 added inline comments to D85666: [clang-tidy] IncludeInserter: allow <> in header name.
Tue, Aug 11, 8:40 AM · Restricted Project
njames93 added a comment to D85666: [clang-tidy] IncludeInserter: allow <> in header name.

Should a line be added to the release notes to explain this behaviour:
'Checks that specify files to include now support wrapping the include in angle brackets to create a system include'?

Tue, Aug 11, 2:37 AM · Restricted Project
njames93 added a comment to D85697: [clang-tidy] Add cppcoreguidelines-prefer-scoped-enums-over-unscoped.

Is 'over-unscoped' really needed in the name, would just 'prefer-scoped-enum' be better, WDYT?

Tue, Aug 11, 2:28 AM · Restricted Project, Restricted Project

Mon, Aug 10

njames93 added a comment to D85621: [clang] Allow DynTypedNode to store a TemplateArgumentLoc.

Please run clang/docs/tools/dump_ast_matchers.py script to update the LibASTMatchersReference.html file.

Done. Note, it looks like this script needs to be run with python 2. Should we document this somewhere?

Mon, Aug 10, 1:06 AM · Restricted Project

Sat, Aug 8

njames93 accepted D85568: [clang] Fix typo in comment.

LG, pretty trivial fix. Side note running that check over the code base leads to a lot of warnings, however most of false positives, like using abbreviations in the comment or parameter.

Sat, Aug 8, 12:10 AM · Restricted Project

Fri, Aug 7

njames93 added inline comments to D85568: [clang] Fix typo in comment.
Fri, Aug 7, 5:40 PM · Restricted Project
njames93 committed rG01bc708126c5: [NFC] Replace hasName in loop for hasAnyName (authored by njames93).
[NFC] Replace hasName in loop for hasAnyName
Fri, Aug 7, 2:23 AM

Thu, Aug 6

njames93 added a comment to D85097: [Sema] add warning for comparisons like 'x<=y<=z'.

Also with a name like compare op parenthesis. It sounds like this would consider == and !=

Thu, Aug 6, 12:13 AM · Restricted Project

Tue, Aug 4

njames93 added a comment to D85072: [ADT] Add getAsOr to Optional.

Hmm, I'm not so sure - getValueOr, for instance, is in std::optional. (value_or)

You're right that 'map', for instance, is not in std::optional, though. That and maybe the "create" function are the non-std::optional API?

And getPointer

I think if this new function was a non-member, it'd probably tidier - wouldn't need an rvalue and non-rvalue overload, as it could use std::forward on both arguments.

non-member could work I guess, and could be adapted for other cases, std::optional or pointers spring to mind.

Tue, Aug 4, 6:18 AM · Restricted Project
njames93 updated the diff for D81923: [clang-tidy] Add modernize-use-ranges check..

rebase

Tue, Aug 4, 6:12 AM · Restricted Project
njames93 committed rG7c4782ce91d6: [clang-tidy] Fix regression in RenamerClangTidy (authored by njames93).
[clang-tidy] Fix regression in RenamerClangTidy
Tue, Aug 4, 1:27 AM

Mon, Aug 3

njames93 committed rG3b44b6c900d1: [clang-tidy][NFC] Use correct size call for reserve (authored by njames93).
[clang-tidy][NFC] Use correct size call for reserve
Mon, Aug 3, 4:31 PM
njames93 updated the diff for D82089: [clang-tidy] modernize-loop-convert reverse iteration support.
  • Rebased trunk
  • Cleaned up test cases
  • Added support for specifying to include as system include.
Mon, Aug 3, 4:10 PM · Restricted Project
njames93 added inline comments to D85097: [Sema] add warning for comparisons like 'x<=y<=z'.
Mon, Aug 3, 2:34 PM · Restricted Project
njames93 added inline comments to D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.
Mon, Aug 3, 7:06 AM · Restricted Project, Restricted Project, Restricted Project
njames93 updated the diff for D85072: [ADT] Add getAsOr to Optional.

Delete the rvalue reference version as it can create dangling references

Mon, Aug 3, 2:58 AM · Restricted Project
njames93 added a comment to D85072: [ADT] Add getAsOr to Optional.

I forget: Have we already decided that Optional won't be replaced by std::optional? If not, then would be good to not add API surface area that doesn't match std::optional (instead preferring non-member functions, for instance).
If that's already been decided in some previous reviews, etc, this sounds OK I guess.

If that's the case then I'd agree with that.
But I kind of gathered it wouldn't be the case considering how much the llvm::Optional API already differs from std::optional.

Probably doesn't need the enable_if, I'd have thought (could just let the implementation fail as usual - there aren't competing member functions, etc)

Fair enough point there.

the parameter should be U&& to use with std::forward, avoid unnecessary copies, etc.

I'm inclined to disagree with that point, this is mean't to be used with types that are cheap to construct and usually passed by value.
Probably don't need the call to std::forward though.

Mon, Aug 3, 2:43 AM · Restricted Project
njames93 updated the diff for D85072: [ADT] Add getAsOr to Optional.

Remove call to forward as it serves no purpose for the use case

Mon, Aug 3, 2:42 AM · Restricted Project

Sat, Aug 1

njames93 added inline comments to D85028: [clangd] Support new/delete operator in TargetFinder..
Sat, Aug 1, 8:51 AM · Restricted Project
njames93 added a comment to D84898: [clang-tidy] Add new checker for complex conditions with no meaning.

I believe all review comments have been address, except for the discussion on implementing this in the CFE or as a tidy check.

Sat, Aug 1, 8:47 AM · Restricted Project, Restricted Project
njames93 requested review of D85072: [ADT] Add getAsOr to Optional.
Sat, Aug 1, 3:23 AM · Restricted Project
njames93 committed rG9f21947a3312: [clang-tidy][NFC] Small refactor (authored by njames93).
[clang-tidy][NFC] Small refactor
Sat, Aug 1, 3:05 AM
njames93 committed rG4888c9ce97d8: [clang-tidy] readability-identifier-naming checks configs for included files (authored by njames93).
[clang-tidy] readability-identifier-naming checks configs for included files
Sat, Aug 1, 2:36 AM
njames93 closed D84814: [clang-tidy] readability-identifier-naming checks configs for included files.
Sat, Aug 1, 2:35 AM · Restricted Project
njames93 updated the diff for D84814: [clang-tidy] readability-identifier-naming checks configs for included files.

Fix unpunctuated comment and simplify second check command.

Sat, Aug 1, 1:19 AM · Restricted Project
njames93 updated the diff for D84814: [clang-tidy] readability-identifier-naming checks configs for included files.
  • Address comments.
  • Added test case for when this behaviour is disabled.
Sat, Aug 1, 1:14 AM · Restricted Project

Fri, Jul 31

njames93 committed rG1fd2049e38da: [clang-tidy][NFC] Added convienence methods for getting optional options (authored by njames93).
[clang-tidy][NFC] Added convienence methods for getting optional options
Fri, Jul 31, 5:46 PM
njames93 closed D84812: [clang-tidy][NFC] Added convienence methods for getting optional options.
Fri, Jul 31, 5:46 PM · Restricted Project
njames93 requested review of D84814: [clang-tidy] readability-identifier-naming checks configs for included files.
Fri, Jul 31, 3:15 AM · Restricted Project
njames93 updated the diff for D84814: [clang-tidy] readability-identifier-naming checks configs for included files.

Added Option GetConfigPerFile to control this behaviour.
Ensure the check is enabled in the header files configuration before using any configuration found.

Fri, Jul 31, 3:14 AM · Restricted Project

Thu, Jul 30

njames93 added inline comments to D75813: [clang-tidy] fix readability-braces-around-statements Stmt type dependency.
Thu, Jul 30, 3:57 PM · Restricted Project, Restricted Project
njames93 committed rGc23ae3f18ee3: [clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap (authored by njames93).
[clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap
Thu, Jul 30, 2:58 PM
njames93 closed D84926: [clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap.
Thu, Jul 30, 2:58 PM · Restricted Project
njames93 added inline comments to D84924: [clang-tidy][WIP] Added command line option `fix-notes`.
Thu, Jul 30, 9:30 AM · Restricted Project, Restricted Project
njames93 updated the diff for D84926: [clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap.

Fix build errors

Thu, Jul 30, 3:24 AM · Restricted Project
njames93 requested review of D84926: [clang-tidy][NFC] Use StringMap for ClangTidyCheckFactories::FacoryMap.
Thu, Jul 30, 3:03 AM · Restricted Project
njames93 committed rG45a720a86432: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap (authored by njames93).
[clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap
Thu, Jul 30, 2:31 AM
njames93 closed D84868: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap.
Thu, Jul 30, 2:31 AM · Restricted Project
njames93 added a comment to D84924: [clang-tidy][WIP] Added command line option `fix-notes`.

This is very much a work in progress

Thu, Jul 30, 2:23 AM · Restricted Project, Restricted Project
njames93 retitled D84924: [clang-tidy][WIP] Added command line option `fix-notes` from [clang-tidy] Added command line option `fix-notes` to [clang-tidy][WIP] Added command line option `fix-notes`.
Thu, Jul 30, 2:22 AM · Restricted Project, Restricted Project
njames93 requested review of D84924: [clang-tidy][WIP] Added command line option `fix-notes`.
Thu, Jul 30, 2:22 AM · Restricted Project, Restricted Project
njames93 accepted D84902: [clang-tidy] Fix ODR violation in unittests..

LGTM, Thanks that bug was eating away at me for a good few days.

Thu, Jul 30, 1:50 AM · Restricted Project
njames93 added a comment to D84898: [clang-tidy] Add new checker for complex conditions with no meaning.

For the record X < Y < Z does have a mathematical meaning, Y is constrained between X and Z.
However in the context of C the expression isnt parsed like that.
If someone writes this they likely wanted (X < Y) && (Y < Z)
For this specific check as you pointed out we wouldn't want to make that assumption though there is a case for adding notes to silence the warning by wrapping one of the comparisons in parenthesis.

Thu, Jul 30, 1:08 AM · Restricted Project, Restricted Project

Wed, Jul 29

njames93 updated the diff for D84814: [clang-tidy] readability-identifier-naming checks configs for included files.

Rebase from parent and address comments.

Wed, Jul 29, 3:48 PM · Restricted Project
njames93 updated the diff for D84812: [clang-tidy][NFC] Added convienence methods for getting optional options.

Revert to using warning for logging parsing errors

Wed, Jul 29, 3:31 PM · Restricted Project
njames93 added reviewers for D75813: [clang-tidy] fix readability-braces-around-statements Stmt type dependency: aaron.ballman, gribozavr2.

*ping*
Sorry, but I have to ask: Is there no interest in improving clang-tidy?
Don't get me wrong. I know it's mostly volunteered time. That's also why this ping took almost 2 months for me.
I frankly lost interest in contributing as I have trouble getting any patches included - and I don't have that much free time anymore. Obviously the time issue is more important, but the other one is still a problem.

Wed, Jul 29, 3:09 PM · Restricted Project, Restricted Project
njames93 updated the diff for D84868: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap.

Missing call to getValue()

Wed, Jul 29, 9:27 AM · Restricted Project
njames93 requested review of D84868: [clang-tidy] Use StringMap for ClangTidyOptions::OptionsMap.
Wed, Jul 29, 9:23 AM · Restricted Project
njames93 committed rGbbc2ddecbd34: [clang-tidy] Handled insertion only fixits when determining conflicts. (authored by njames93).
[clang-tidy] Handled insertion only fixits when determining conflicts.
Wed, Jul 29, 8:36 AM
njames93 closed D82898: [clang-tidy] Handled insertion only fixits when determining conflicts..
Wed, Jul 29, 8:35 AM · Restricted Project, Restricted Project
njames93 committed rG62beb7c6f4f2: [clang-tidy] Fix module options being registered with different priorities (authored by njames93).
[clang-tidy] Fix module options being registered with different priorities
Wed, Jul 29, 8:19 AM
njames93 closed D84850: [clang-tidy] Fix module options being registered with different priorities.
Wed, Jul 29, 8:19 AM · Restricted Project
njames93 added a comment to D84831: [clang-tidy] Fix RedundantStringCStrCheck with r values.

Passed test cases but failed in the real world as std::string has a non trivial destructor so creates a CXXBindTemporaryExpr.

An idea for a future change: move the std::string mock from this test into a header that is shared across all tests that need a std::string. That will hopefully allow us to combine forces when curating the standard library mocks.

That does sound like a good plan, could also add maybe vector

Wed, Jul 29, 8:18 AM · Restricted Project
njames93 requested review of D84850: [clang-tidy] Fix module options being registered with different priorities.
Wed, Jul 29, 8:01 AM · Restricted Project
njames93 committed rGb99630e43261: [clang-tidy] Fix RedundantStringCStrCheck with r values (authored by njames93).
[clang-tidy] Fix RedundantStringCStrCheck with r values
Wed, Jul 29, 7:36 AM
njames93 closed D84831: [clang-tidy] Fix RedundantStringCStrCheck with r values.
Wed, Jul 29, 7:35 AM · Restricted Project
njames93 updated the diff for D84812: [clang-tidy][NFC] Added convienence methods for getting optional options.

Rename logOptionParsingError

Wed, Jul 29, 4:04 AM · Restricted Project
njames93 added inline comments to D84812: [clang-tidy][NFC] Added convienence methods for getting optional options.
Wed, Jul 29, 4:04 AM · Restricted Project
njames93 updated the diff for D84814: [clang-tidy] readability-identifier-naming checks configs for included files.
  • Address comments
Wed, Jul 29, 4:04 AM · Restricted Project
njames93 requested review of D84831: [clang-tidy] Fix RedundantStringCStrCheck with r values.
Wed, Jul 29, 4:04 AM · Restricted Project

Tue, Jul 28

njames93 updated the diff for D84814: [clang-tidy] readability-identifier-naming checks configs for included files.

Add missing new lines in test files.

Tue, Jul 28, 6:12 PM · Restricted Project
njames93 requested review of D84814: [clang-tidy] readability-identifier-naming checks configs for included files.
Tue, Jul 28, 6:09 PM · Restricted Project
njames93 updated the diff for D84812: [clang-tidy][NFC] Added convienence methods for getting optional options.

Fix wrong patch diff

Tue, Jul 28, 6:00 PM · Restricted Project
njames93 requested review of D84812: [clang-tidy][NFC] Added convienence methods for getting optional options.
Tue, Jul 28, 5:59 PM · Restricted Project
njames93 added inline comments to D82898: [clang-tidy] Handled insertion only fixits when determining conflicts..
Tue, Jul 28, 4:45 PM · Restricted Project, Restricted Project
njames93 updated the diff for D82898: [clang-tidy] Handled insertion only fixits when determining conflicts..

Remove unreachable after switch

Tue, Jul 28, 4:45 PM · Restricted Project, Restricted Project
njames93 added inline comments to D75184: [clang-tidy] Optional inheritance of file configs from parent directories .
Tue, Jul 28, 4:16 PM · Restricted Project, Restricted Project
njames93 committed rG7bae3188e087: [clang-tidy][NFC] Make OptionsView methods as const where missing (authored by njames93).
[clang-tidy][NFC] Make OptionsView methods as const where missing
Tue, Jul 28, 6:53 AM
njames93 updated the diff for D82898: [clang-tidy] Handled insertion only fixits when determining conflicts..

Replace if/else logic with switches

Tue, Jul 28, 5:39 AM · Restricted Project, Restricted Project
njames93 updated the diff for D82898: [clang-tidy] Handled insertion only fixits when determining conflicts..

Fix new lines in test

Tue, Jul 28, 5:16 AM · Restricted Project, Restricted Project
njames93 added a comment to D84453: [clang-tidy] Suppress one unittest on macOS..
In D84453#2177665, @NoQ wrote:

I was having issues with this test case under macos in D82188.
It would fail for seemingly no apparent reason until I disable a test in a different translation unit.
This made me think there is a subtle bug in the linker used on macos. That could also explain why asan is having a hard time with this as well.
I got as far as seeing that runCheckOnCode was called, the check was instantiated but its matchers never got registered effectively meaning it didn't run.

Damn, i'm very glad you showed up. I can reproduce your problem as well, so ASan is probably not at fault. I'll try to talk to linker folks to see if they can fix this.

I guess i'll still commit this patch so that to unbreak the buildbots but i'll keep an eye on this issue.

Tue, Jul 28, 4:54 AM · Restricted Project

Mon, Jul 27

njames93 committed rGd1271127240b: [llvm][NFC] Silence unused variable warning by using isa over dyn_cast (authored by njames93).
[llvm][NFC] Silence unused variable warning by using isa over dyn_cast
Mon, Jul 27, 5:37 AM
njames93 committed rG13c9bbc28ef9: [clang-tidy] Refactor IncludeInserter (authored by njames93).
[clang-tidy] Refactor IncludeInserter
Mon, Jul 27, 4:49 AM
njames93 closed D83680: [clang-tidy] Refactor IncludeInserter.
Mon, Jul 27, 4:49 AM · Restricted Project

Sun, Jul 26

njames93 retitled D84591: [clang-tidy][NFC] Replace comment by private method from [clang-tidy] Replace comment by private method to [clang-tidy][NFC] Replace comment by private method.
Sun, Jul 26, 7:13 AM · Restricted Project, Restricted Project

Sat, Jul 25

njames93 committed rG4363ea61058b: Fix C2975 error under MSVC (authored by njames93).
Fix C2975 error under MSVC
Sat, Jul 25, 3:04 AM
njames93 committed rG6c25fc35e096: [ADT] Add a range-based version of std::move (authored by njames93).
[ADT] Add a range-based version of std::move
Sat, Jul 25, 2:37 AM
njames93 closed D83902: [ADT] Add a range-based version of std::move.
Sat, Jul 25, 2:37 AM · Restricted Project

Fri, Jul 24

njames93 added a comment to D84453: [clang-tidy] Suppress one unittest on macOS..

I was having issues with this test case under macos in D82188.
It would fail for seemingly no apparent reason until I disable a test in a different translation unit.
This made me think there is a subtle bug in the linker used on macos. That could also explain why asan is having a hard time with this as well.
I got as far as seeing that runCheckOnCode was called, the check was instantiated but its matchers never got registered effectively meaning it didn't run.

Fri, Jul 24, 1:39 AM · Restricted Project

Tue, Jul 21

njames93 added inline comments to D83902: [ADT] Add a range-based version of std::move.
Tue, Jul 21, 4:13 AM · Restricted Project
njames93 updated the diff for D83902: [ADT] Add a range-based version of std::move.

Added more test cases

Tue, Jul 21, 4:03 AM · Restricted Project
njames93 committed rG1890a65ca175: [ADT] use is_base_of inplace of is_same for random_access_iterator_tag checks (authored by njames93).
[ADT] use is_base_of inplace of is_same for random_access_iterator_tag checks
Tue, Jul 21, 1:56 AM
njames93 closed D84141: [ADT] use is_base_of inplace of is_same for random_access_iterator_tag checks.
Tue, Jul 21, 1:55 AM · Restricted Project
njames93 added a comment to D83759: [clangd] Fixes in lit tests.

What do you think of this patch? I'm not sure if Windows is important OS for developers.

Windows is most certainly an important OS for developers and something the whole llvm project has been trying to catch up on where possible.

Tue, Jul 21, 1:53 AM · Restricted Project

Mon, Jul 20

njames93 added inline comments to D83902: [ADT] Add a range-based version of std::move.
Mon, Jul 20, 9:16 PM · Restricted Project
njames93 added a comment to D84141: [ADT] use is_base_of inplace of is_same for random_access_iterator_tag checks.

Fair enough - might be nice to have a test case? But may not be worth it.

Mon, Jul 20, 9:16 PM · Restricted Project
Herald added a project to D84141: [ADT] use is_base_of inplace of is_same for random_access_iterator_tag checks: Restricted Project.
Mon, Jul 20, 1:19 AM · Restricted Project

Fri, Jul 17

njames93 updated the diff for D83902: [ADT] Add a range-based version of std::move.

Remove unneeded include

Fri, Jul 17, 3:38 PM · Restricted Project
njames93 added inline comments to D83902: [ADT] Add a range-based version of std::move.
Fri, Jul 17, 3:38 PM · Restricted Project
njames93 added inline comments to D83902: [ADT] Add a range-based version of std::move.
Fri, Jul 17, 2:12 PM · Restricted Project
njames93 updated the diff for D83902: [ADT] Add a range-based version of std::move.

Removed std::string from test case in favour of custom moveable class.

Fri, Jul 17, 1:57 PM · Restricted Project
njames93 added a comment to D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

My thoughts exactly! I also thought about anchor-points as a feature in file-check, as that would immensely increase the readability of the test-code in such cases.

Fri, Jul 17, 10:00 AM · Restricted Project, Restricted Project, Restricted Project
njames93 updated the summary of D84037: [FileCheck][WIP] Added support for line anchors.
Fri, Jul 17, 9:36 AM · Restricted Project
njames93 updated the summary of D84037: [FileCheck][WIP] Added support for line anchors.
Fri, Jul 17, 9:35 AM · Restricted Project
njames93 updated the diff for D83680: [clang-tidy] Refactor IncludeInserter.

Address reviewer comments

Fri, Jul 17, 9:33 AM · Restricted Project
Herald added a project to D84037: [FileCheck][WIP] Added support for line anchors: Restricted Project.
Fri, Jul 17, 8:49 AM · Restricted Project

Thu, Jul 16

njames93 updated the diff for D82089: [clang-tidy] modernize-loop-convert reverse iteration support.

Updated release notes for version bump.

Thu, Jul 16, 1:49 AM · Restricted Project
njames93 added a comment to D83717: [clang-tidy] Add check fo SEI CERT item ENV32-C.

I have bitten the bullet, and have gone down this route. With relative numbering, the sections themselves are at least translation-invariant. Not the prettiest sight, tho.
Thanks!

Thu, Jul 16, 1:04 AM · Restricted Project, Restricted Project, Restricted Project
njames93 updated the diff for D83902: [ADT] Add a range-based version of std::move.

Added unit test.

Thu, Jul 16, 12:54 AM · Restricted Project