Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang-tidy: False positive readability-redundant-inline-specifier #122291

Open
joto opened this issue Jan 9, 2025 · 2 comments
Open

Clang-tidy: False positive readability-redundant-inline-specifier #122291

joto opened this issue Jan 9, 2025 · 2 comments
Labels
clang-tidy false-positive Warning fires when it should not

Comments

@joto
Copy link

joto commented Jan 9, 2025

clang-tidy shows "readability-redundant-inline-specifier" messages for methods defined outside the class in a header file. But it should not do that, because it violates the one-definition-rule. Usually those definitions would be in a cpp file not a header file, but sometimes they are not, in a header-only library for instance.

@llvmbot
Copy link
Member

llvmbot commented Jan 9, 2025

@llvm/issue-subscribers-clang-tidy

Author: Jochen Topf (joto)

clang-tidy shows "readability-redundant-inline-specifier" messages for methods defined outside the class in a header file. But it should not do that, because it violates the one-definition-rule. Usually those definitions would be in a cpp file not a header file, but sometimes they are not, in a header-only library for instance.

@EugeneZelenko EugeneZelenko added the false-positive Warning fires when it should not label Jan 9, 2025
@firewave
Copy link

firewave commented Jan 9, 2025

Can you please provide a small example to reproduce?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy false-positive Warning fires when it should not
Projects
None yet
Development

No branches or pull requests

4 participants