Skip to content

🚨 Relax google-explicit-constructor lint directives#939

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

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

Conversation

@elbeno

@elbeno elbeno commented Jul 7, 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. (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.
@bdeane-intel
bdeane-intel merged commit 46f4b61 into intel:main Jul 7, 2026
28 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