-
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-positiveWarning fires when it should notWarning fires when it should not
Description
$ cat test.cpp
class c {
protected:
virtual ~c();
virtual int *d() const;
};
template <typename> class e : c {
int *d() const override;
};
int t = sizeof(e<int>);
$ clang++ -c -std=gnu++2b -Wundefined-func-template test.cpp
test.cpp:7:27: warning: instantiation of function 'e::d' required here, but no definition is available [-Wundefined-func-template]
7 | template class e : c {
I don’t think instantiation of e::d is needed to compute the size of the class.
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-positiveWarning fires when it should notWarning fires when it should not