aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorBaranov Victor <bar.victor.2002@gmail.com>2025-03-28 16:33:58 +0300
committerGitHub <noreply@github.com>2025-03-28 21:33:58 +0800
commitd6dcd985c03bec4b77872be00a81d92454fedc32 (patch)
tree9e514a00cf4d36ed47411fb68eb0ffe78401479b /clang/lib/Frontend/CompilerInvocation.cpp
parentecdbd26ba4b6017200b7773d41a270aa1fa2bd71 (diff)
downloadllvm-d6dcd985c03bec4b77872be00a81d92454fedc32.zip
llvm-d6dcd985c03bec4b77872be00a81d92454fedc32.tar.gz
llvm-d6dcd985c03bec4b77872be00a81d92454fedc32.tar.bz2
[clang-tidy] Fix `thread_local` false positives in `misc-use-internal-linkage` check (#132573)
Based on C++ standard (see issue https://github.com/llvm/llvm-project/issues/131679) and [StackOverflow](https://stackoverflow.com/questions/22794382/are-c11-thread-local-variables-automatically-static) `thread_local` variables are implicitly `static` so we should not suggest adding `static` on a `thread_local` variables. I'd appreciate if someone else will confirm this too because reading standard is tricky. However, many people still use `static` and `thread_local` together: [github code-search](https://github.com/search?type=code&q=%22static+thread_local%22+language%3AC%2B%2B). Maybe disabling warnings on `thread_local` should be made as a flag? WDYT? Closes https://github.com/llvm/llvm-project/issues/131679.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions