llvm / llvm/llvm-project

Clang tidy: add a modernize check to use the explicit object parameter

Open
#177,882 6 comments 1 reaction 0 assignees View on GitHub
check-request clang-tidy
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

Before:

```cpp
struct S
{
auto foo() const -> void {}
};
```

After:

```cpp
struct S
{
auto foo(this S const &self) -> void {}
};
```

Contributor guide

Open the contributing guide

Research direction

No file or test path is specified. Locate existing Clang-Tidy modernize checks and their corresponding tests, then compare the issue's before/after C++ examples; done means the requested explicit-object-parameter modernization is implemented with coverage for the shown form.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.