[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/70107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-25 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/70107 >From 9db10fc83ec3683b1d5b6f8606fc37a83fe224fa Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 24 Oct 2023 15:15:15 -0400 Subject: [PATCH 1/4] [C23] Use thread_local semantics When implementing thre

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-25 Thread Aaron Ballman via cfe-commits
@@ -493,6 +493,9 @@ Bug Fixes in This Version Fixes (`#65143 `_) - Fix crash in formatting the real/imaginary part of a complex lvalue. Fixes (`#69218 `_) +- No longer use

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-25 Thread Mariya Podchishchaeva via cfe-commits
@@ -493,6 +493,9 @@ Bug Fixes in This Version Fixes (`#65143 `_) - Fix crash in formatting the real/imaginary part of a complex lvalue. Fixes (`#69218 `_) +- No longer use

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/70107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -std=c23 -emit-llvm -o - %s | FileCheck %s + +// Ensure that thread_local and _Thread_local emit the same codegen. See +// https://github.com/llvm/llvm-project/issues/70068 for details. + +void func(void) { + static

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/70107 >From 9db10fc83ec3683b1d5b6f8606fc37a83fe224fa Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 24 Oct 2023 15:15:15 -0400 Subject: [PATCH 1/3] [C23] Use thread_local semantics When implementing thre

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -std=c23 -emit-llvm -o - %s | FileCheck %s + +// Ensure that thread_local and _Thread_local emit the same codegen. See +// https://github.com/llvm/llvm-project/issues/70068 for details. + +void func(void) { + static

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -std=c23 -emit-llvm -o - %s | FileCheck %s + +// Ensure that thread_local and _Thread_local emit the same codegen. See +// https://github.com/llvm/llvm-project/issues/70068 for details. + +void func(void) { + static

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Aaron Ballman via cfe-commits
@@ -4076,8 +4076,15 @@ void Parser::ParseDeclarationSpecifiers( case tok::kw_thread_local: if (getLangOpts().C23) Diag(Tok, diag::warn_c23_compat_keyword) << Tok.getName(); - isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS_thread_local, Loc, -

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/70107 >From 9db10fc83ec3683b1d5b6f8606fc37a83fe224fa Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Tue, 24 Oct 2023 15:15:15 -0400 Subject: [PATCH 1/2] [C23] Use thread_local semantics When implementing thre

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Erich Keane via cfe-commits
@@ -0,0 +1,27 @@ +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -std=c23 -emit-llvm -o - %s | FileCheck %s + +// Ensure that thread_local and _Thread_local emit the same codegen. See +// https://github.com/llvm/llvm-project/issues/70068 for details. + +void func(void) { + static

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -fsyntax-only -std=c23 %s -verify + +// Ensure that thread_local and _Thread_local are synonyms in C23 and both +// restrict local variables to be explicitly static or extern. +void func(void) { + // FIXME: it would be nice if the diagnostic s

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread via cfe-commits
https://github.com/cor3ntin commented: LGTM but I did not review the codegen tests. https://github.com/llvm/llvm-project/pull/70107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread via cfe-commits
@@ -4076,8 +4076,15 @@ void Parser::ParseDeclarationSpecifiers( case tok::kw_thread_local: if (getLangOpts().C23) Diag(Tok, diag::warn_c23_compat_keyword) << Tok.getName(); - isInvalid = DS.SetStorageClassSpecThread(DeclSpec::TSCS_thread_local, Loc, -

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/70107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes 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 f

[clang] [C23] Use thread_local semantics (PR #70107)

2023-10-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/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