File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,10 @@ void UseInternalLinkageCheck::registerMatchers(MatchFinder *Finder) {
130
130
isMain ())))
131
131
.bind (" fn" ),
132
132
this );
133
- Finder->addMatcher (varDecl (Common, hasGlobalStorage ()).bind (" var" ), this );
133
+ Finder->addMatcher (
134
+ varDecl (Common, hasGlobalStorage (), unless (hasThreadStorageDuration ()))
135
+ .bind (" var" ),
136
+ this );
134
137
}
135
138
136
139
static constexpr StringRef Message =
Original file line number Diff line number Diff line change @@ -159,7 +159,9 @@ Changes in existing checks
159
159
160
160
- Improved :doc: `misc-use-internal-linkage
161
161
<clang-tidy/checks/misc/use-internal-linkage>` check by fix false positives
162
- for function or variable in header file which contains macro expansion.
162
+ for function or variable in header file which contains macro expansion and
163
+ excluding variables with ``thread_local `` storage class specifier from being
164
+ matched.
163
165
164
166
- Improved :doc: `modernize-use-default-member-init
165
167
<clang-tidy/checks/modernize/use-default-member-init>` check by matching
Original file line number Diff line number Diff line change @@ -31,6 +31,8 @@ extern int global_extern;
31
31
32
32
static int global_static;
33
33
34
+ thread_local int global_thread_local;
35
+
34
36
namespace {
35
37
static int global_anonymous_ns;
36
38
namespace NS {
@@ -41,6 +43,7 @@ static int global_anonymous_ns;
41
43
static void f (int para) {
42
44
int local;
43
45
static int local_static;
46
+ thread_local int local_thread_local;
44
47
}
45
48
46
49
struct S {
You can’t perform that action at this time.
0 commit comments