Skip to content

🚨 Relax google-explicit-constructor lint directives#390

Merged
elbeno merged 1 commit into
intel:mainfrom
elbeno:fix-explicit-constructor-clang-tidy
Jul 6, 2026
Merged

🚨 Relax google-explicit-constructor lint directives#390
elbeno merged 1 commit into
intel:mainfrom
elbeno:fix-explicit-constructor-clang-tidy

Conversation

@elbeno

@elbeno elbeno commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Problem:

  • The clang-tidy google-explicit-constructor can now (clang-22, but perhaps earlier also) deal with explicit(false) directives, so we don't need to mark such constructors with a lint-workaround comment.

Solution:

  • Remove the NOLINT directives from constructors that can be marked explicit(false).

Note:

  • Implicit conversion operators must still be marked. (https://godbolt.org/z/nfj6sahvo)
  • In clang-23 it looks like misc-explicit-constructor is now the "base" clang-tidy, which google-explicit-constructor aliases.

Problem:
- The clang-tidy `google-explicit-constructor` can now (clang-22, but perhaps
  earlier also) deal with `explicit(false)` directives, so we don't need to mark
  such constructors with a lint-workaround comment.

Solution:
- Remove the `NOLINT` directives from constructors that can be marked
  `explicit(false)`.

Note:
- Implicit conversion operators must still be marked.
- In clang-23 it looks like `misc-explicit-constructor` is now the "base"
  clang-tidy, which `google-explicit-constructor` aliases.
@elbeno elbeno enabled auto-merge July 6, 2026 17:57
@elbeno elbeno merged commit a0acbcf into intel:main Jul 6, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants