[clang] be646ef - Make clang/test/C/C2x/n2934.c compatible with targets that do not support thread_local storage.

Fanbo Meng via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 2 08:18:28 PST 2023


Author: Fanbo Meng
Date: 2023-03-02T11:18:19-05:00
New Revision: be646ef39298503592407fd7eac9ce7fc2ee5f7c

URL: https://github.com/llvm/llvm-project/commit/be646ef39298503592407fd7eac9ce7fc2ee5f7c
DIFF: https://github.com/llvm/llvm-project/commit/be646ef39298503592407fd7eac9ce7fc2ee5f7c.diff

LOG: Make clang/test/C/C2x/n2934.c compatible with targets that do not support thread_local storage.

Add an optional error check to test case for it to pass on targets that do not support thread_local storage.

Reviewed By: aaron.ballman, abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D145158

Added: 
    

Modified: 
    clang/test/C/C2x/n2934.c

Removed: 
    


################################################################################
diff  --git a/clang/test/C/C2x/n2934.c b/clang/test/C/C2x/n2934.c
index d36e0b76344a3..d967446d8465a 100644
--- a/clang/test/C/C2x/n2934.c
+++ b/clang/test/C/C2x/n2934.c
@@ -7,6 +7,7 @@
 
 thread_local struct alignas(int) S { // c2x-warning {{'alignas' is incompatible with C standards before C2x}} \
                                         c2x-warning {{'thread_local' is incompatible with C standards before C2x}} \
+                                        c2x-error 0+ {{thread-local storage is not supported for the current target}} \
                                         c17-error {{unknown type name 'thread_local'}} \
                                         c17-error {{expected identifier or '('}} \
                                         c17-error {{expected ')'}} \


        


More information about the cfe-commits mailing list