r369957 - Reword the C11 extension diagnostic.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 26 13:29:08 PDT 2019


Author: aaronballman
Date: Mon Aug 26 13:29:08 2019
New Revision: 369957

URL: http://llvm.org/viewvc/llvm-project?rev=369957&view=rev
Log:
Reword the C11 extension diagnostic.

This makes it more consistent with other language extension diagnostics.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
    cfe/trunk/test/Parser/c1x-alignas.c
    cfe/trunk/test/Sema/thread-specifier.c

Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=369957&r1=369956&r2=369957&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Mon Aug 26 13:29:08 2019
@@ -127,7 +127,7 @@ def note_previous_default_assoc : Note<
   "previous default generic association is here">;
 
 def ext_c11_feature : Extension<
-  "%0 is a C11-specific feature">, InGroup<C11>;
+  "%0 is a C11 extension">, InGroup<C11>;
 
 def ext_c11_noreturn : Extension<
   "_Noreturn functions are a C11-specific feature">, InGroup<C11>;

Modified: cfe/trunk/test/Parser/c1x-alignas.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/c1x-alignas.c?rev=369957&r1=369956&r2=369957&view=diff
==============================================================================
--- cfe/trunk/test/Parser/c1x-alignas.c (original)
+++ cfe/trunk/test/Parser/c1x-alignas.c Mon Aug 26 13:29:08 2019
@@ -9,5 +9,5 @@ char c4 _Alignas(32); // expected-error
 
 char _Alignas(_Alignof(int)) c5;
 
-// CHECK-EXT: _Alignas is a C11-specific feature
-// CHECK-EXT: _Alignof is a C11-specific feature
+// CHECK-EXT: _Alignas is a C11 extension
+// CHECK-EXT: _Alignof is a C11 extension

Modified: cfe/trunk/test/Sema/thread-specifier.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/thread-specifier.c?rev=369957&r1=369956&r2=369957&view=diff
==============================================================================
--- cfe/trunk/test/Sema/thread-specifier.c (original)
+++ cfe/trunk/test/Sema/thread-specifier.c Mon Aug 26 13:29:08 2019
@@ -11,16 +11,16 @@
 #undef __private_extern__
 #endif
 
-__thread int t1; // thread-local-warning {{_Thread_local is a C11-specific feature}}
-__thread extern int t2; // thread-local-warning {{_Thread_local is a C11-specific feature}}
-__thread static int t3; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread int t1; // thread-local-warning {{_Thread_local thread-local-warning}}
+__thread extern int t2; // thread-local-warning {{_Thread_local is a C11 extension}}
+__thread static int t3; // thread-local-warning {{_Thread_local is a C11 extension}}
 #ifdef GNU
 // expected-warning at -3 {{'__thread' before 'extern'}}
 // expected-warning at -3 {{'__thread' before 'static'}}
 #endif
 
-__thread __private_extern__ int t4; // thread-local-warning {{_Thread_local is a C11-specific feature}}
-struct t5 { __thread int x; }; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread __private_extern__ int t4; // thread-local-warning {{_Thread_local is a C11 extension}}
+struct t5 { __thread int x; }; // thread-local-warning {{_Thread_local is a C11 extension}}
 #ifdef __cplusplus
 // expected-error-re at -2 {{'{{__thread|_Thread_local|thread_local}}' is only allowed on variable declarations}}
 #else
@@ -28,7 +28,7 @@ struct t5 { __thread int x; }; // thread
 // expected-error at -5 {{type name does not allow storage class to be specified}}
 #endif
 
-__thread int t6(); // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread int t6(); // thread-local-warning {{_Thread_local is a C11 extension}}
 #if defined(GNU)
 // expected-error at -2 {{'__thread' is only allowed on variable declarations}}
 #elif defined(C11) || defined(C99)
@@ -38,53 +38,53 @@ __thread int t6(); // thread-local-warni
 #endif
 
 int f(__thread int t7) { // expected-error {{' is only allowed on variable declarations}} \
-                         // thread-local-warning {{_Thread_local is a C11-specific feature}}
-  __thread int t8; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                         // thread-local-warning {{_Thread_local is a C11 extension}}
+  __thread int t8; // thread-local-warning {{_Thread_local is a C11 extension}}
 #if defined(GNU)
   // expected-error at -2 {{'__thread' variables must have global storage}}
 #elif defined(C11) || defined(C99)
   // expected-error at -4 {{'_Thread_local' variables must have global storage}}
 #endif
-  extern __thread int t9; // thread-local-warning {{_Thread_local is a C11-specific feature}}
-  static __thread int t10; // thread-local-warning {{_Thread_local is a C11-specific feature}}
-  __thread __private_extern__ int t11; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+  extern __thread int t9; // thread-local-warning {{_Thread_local is a C11 extension}}
+  static __thread int t10; // thread-local-warning {{_Thread_local is a C11 extension}}
+  __thread __private_extern__ int t11; // thread-local-warning {{_Thread_local is a C11 extension}}
 #if __cplusplus < 201103L
   __thread auto int t12a; // expected-error-re {{cannot combine with previous '{{__thread|_Thread_local}}' declaration specifier}} \
-                          // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                          // thread-local-warning {{_Thread_local is a C11 extension}}
   auto __thread int t12b; // expected-error {{cannot combine with previous 'auto' declaration specifier}} \
-                          // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                          // thread-local-warning {{_Thread_local is a C11 extension}}
 #elif !defined(CXX11)
   __thread auto t12a = 0; // expected-error {{'_Thread_local' variables must have global storage}} \
-                          // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                          // thread-local-warning {{_Thread_local is a C11 extension}}
   auto __thread t12b = 0; // expected-error {{'_Thread_local' variables must have global storage}} \
-                          // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                          // thread-local-warning {{_Thread_local is a C11 extension}}
 #endif
   __thread register int t13a; // expected-error-re {{cannot combine with previous '{{__thread|_Thread_local|thread_local}}' declaration specifier}} \
-                              // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                              // thread-local-warning {{_Thread_local is a C11 extension}}
   register __thread int t13b; // expected-error {{cannot combine with previous 'register' declaration specifier}} \
-                              // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                              // thread-local-warning {{_Thread_local is a C11 extension}}
 }
 
 __thread typedef int t14; // expected-error-re {{cannot combine with previous '{{__thread|_Thread_local|thread_local}}' declaration specifier}} \
-                          // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                          // thread-local-warning {{_Thread_local is a C11 extension}}
 __thread int t15; // expected-note {{previous definition is here}} \
-                  // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                  // thread-local-warning {{_Thread_local is a C11 extension}}
 extern int t15; // expected-error {{non-thread-local declaration of 't15' follows thread-local declaration}}
 extern int t16; // expected-note {{previous declaration is here}}
 __thread int t16; // expected-error {{thread-local declaration of 't16' follows non-thread-local declaration}} \
-                  // thread-local-warning {{_Thread_local is a C11-specific feature}}
+                  // thread-local-warning {{_Thread_local is a C11 extension}}
 
 #ifdef CXX11
 extern thread_local int t17; // expected-note {{previous declaration is here}}
 _Thread_local int t17; // expected-error {{thread-local declaration of 't17' with static initialization follows declaration with dynamic initialization}} \
-                       // expected-warning {{_Thread_local is a C11-specific feature}}
+                       // expected-warning {{_Thread_local is a C11 extension}}
 extern _Thread_local int t18; // expected-note {{previous declaration is here}} \
-                              // expected-warning {{_Thread_local is a C11-specific feature}}
+                              // expected-warning {{_Thread_local is a C11 extension}}
 thread_local int t18; // expected-error {{thread-local declaration of 't18' with dynamic initialization follows declaration with static initialization}}
 #endif
 
 // PR13720
-__thread int thread_int; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread int thread_int; // thread-local-warning {{_Thread_local is a C11 extension}}
 int *thread_int_ptr = &thread_int;
 #ifndef __cplusplus
 // expected-error at -2 {{initializer element is not a compile-time constant}}
@@ -97,7 +97,7 @@ constexpr int *thread_int_ptr_2 = &threa
 #endif
 
 int non_const();
-__thread int non_const_init = non_const(); // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread int non_const_init = non_const(); // thread-local-warning {{_Thread_local is a C11 extension}}
 #if !defined(__cplusplus)
 // expected-error at -2 {{initializer element is not a compile-time constant}}
 #elif !defined(CXX11)
@@ -111,7 +111,7 @@ __thread int non_const_init = non_const(
 struct S {
   ~S();
 };
-__thread S s; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread S s; // thread-local-warning {{_Thread_local is a C11 extension}}
 #if !defined(CXX11)
 // expected-error at -2 {{type of thread-local variable has non-trivial destruction}}
 #if __cplusplus >= 201103L
@@ -124,7 +124,7 @@ __thread S s; // thread-local-warning {{
 struct HasCtor {
   HasCtor();
 };
-__thread HasCtor var_with_ctor; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread HasCtor var_with_ctor; // thread-local-warning {{_Thread_local is a C11 extension}}
 #if !defined(CXX11)
 // expected-error at -2 {{initializer for thread-local variable must be a constant expression}}
 #if __cplusplus >= 201103L
@@ -133,4 +133,4 @@ __thread HasCtor var_with_ctor; // threa
 #endif
 #endif
 
-__thread int aggregate[10] = {0}; // thread-local-warning {{_Thread_local is a C11-specific feature}}
+__thread int aggregate[10] = {0}; // thread-local-warning {{_Thread_local is a C11 extension}}




More information about the cfe-commits mailing list