-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
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 analyzerfalse-negativeWarning doesn't fire when it shouldWarning doesn't fire when it shouldgenerated by fuzzerquality-of-implementation
Description
Program
template <class T> struct S {
T f;
S() : f() {}
S foo() {
return;
}
};
int main() {
S<int> f,g;
}
Repro: https://godbolt.org/z/cf7oTvqfa
✅ GCC correctly rejects with a diagnostic.
❌ Clang accepts, unless the function is called.
When the return type of function foo
is changed from S
to int
, Clang does reject the code.
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 analyzerfalse-negativeWarning doesn't fire when it shouldWarning doesn't fire when it shouldgenerated by fuzzerquality-of-implementation