-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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 analyzer
Description
Test case:
struct HasDestructor {
~HasDestructor () {}
};
static thread_local HasDestructor hasDestructor;
Compile with:
$ clang++ -Wexit-time-destructors -c test.cxx
test.cxx:5:35: warning: declaration requires an exit-time destructor [-Wexit-time-destructors]
5 | static thread_local HasDestructor hasDestructor;
| ^
1 warning generated.
It seems to me that the warning does not make sense for thread_local
variables (assuming that "exit-time" is meant as "process exit-time" and not "thread exit-time").
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 analyzer