[C23] Use thread_local semantics (#70107)
authorAaron Ballman <aaron@aaronballman.com>
Wed, 25 Oct 2023 11:51:28 +0000 (07:51 -0400)
committerTobias Hieta <tobias@hieta.se>
Fri, 27 Oct 2023 12:47:29 +0000 (14:47 +0200)
commit2a41d978b4fa6dee568e247dd8bd9cabf34660b4
treef5e04a9262485cf8d60100c7344b1d9f9fa080fe
parentafbe3549af4d2e9c2746ea86c6a74708729c7b69
[C23] Use thread_local semantics (#70107)

When implementing thread_local as a keyword in C23, we accidentally
started using C++11 thread_local semantics when using that keyword
instead of using C11 _Thread_local semantics.

This oversight is fixed by pretending the user wrote _Thread_local
instead. This doesn't have the best behavior in terms of diagnostics,
but it does correct the semantic behavior.

Fixes https://github.com/llvm/llvm-project/issues/70068
Fixes https://github.com/llvm/llvm-project/issues/69167
clang/docs/ReleaseNotes.rst
clang/lib/Parse/ParseDecl.cpp
clang/test/CodeGen/thread_local.c [new file with mode: 0644]
clang/test/Sema/thread_local.c [new file with mode: 0644]