mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 20:26:05 +00:00

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.