-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Closed
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partyfalse-negativegood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
clang version: 19.1
os: ubuntu 22.04
class A
{
public:
A() : m_x(0)
{
}
private:
const int m_x;
};
#ifdef BUG
class C
{
friend auto operator==(C, C) -> bool = default;
};
#endif
int main()
{
[[maybe_unused]] auto c = A();
}
clang++ -std=c++20 -Wall main.cpp
main.cpp:8:14: warning: private field 'm_x' is not used [-Wunused-private-field]
8 | const int m_x;
| ^
1 warning generated.
clang++ -DBUG -std=c++20 -Wall main.cpp
no warnings
Metadata
Metadata
Assignees
Labels
clang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerNew/improved warning or error message in Clang, but not in clang-tidy or static analyzerconfirmedVerified by a second partyVerified by a second partyfalse-negativegood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute