[clang] [clang] Support __typeof_unqual__ in all C modes (PR #87392)

2024-04-20 Thread Tobias Hieta via cfe-commits

tru wrote:

The final decision is Toms, but I don't think it qualifies since we are so late 
in the current process and that 19 will start in just a few months. 

https://github.com/llvm/llvm-project/pull/87392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Support __typeof_unqual__ in all C modes (PR #87392)

2024-04-20 Thread via cfe-commits


@@ -665,28 +665,30 @@ KEYWORD(__kindof , KEYOBJC)
 
 // Alternate spelling for various tokens.  There are GCC extensions in all
 // languages, but should not be disabled in strict conformance mode.
-ALIAS("__alignof__"  , __alignof  , KEYALL)
-ALIAS("__asm", asm, KEYALL)
-ALIAS("__asm__"  , asm, KEYALL)
-ALIAS("__attribute__", __attribute, KEYALL)
-ALIAS("__complex", _Complex   , KEYALL)
-ALIAS("__complex__"  , _Complex   , KEYALL)
-ALIAS("__const"  , const  , KEYALL)
-ALIAS("__const__", const  , KEYALL)
-ALIAS("__decltype"   , decltype   , KEYCXX)
-ALIAS("__imag__" , __imag , KEYALL)
-ALIAS("__inline" , inline , KEYALL)
-ALIAS("__inline__"   , inline , KEYALL)
-ALIAS("__nullptr", nullptr, KEYCXX)
-ALIAS("__real__" , __real , KEYALL)
-ALIAS("__restrict"   , restrict   , KEYALL)
-ALIAS("__restrict__" , restrict   , KEYALL)
-ALIAS("__signed" , signed , KEYALL)
-ALIAS("__signed__"   , signed , KEYALL)
-ALIAS("__typeof" , typeof , KEYALL)
-ALIAS("__typeof__"   , typeof , KEYALL)
-ALIAS("__volatile"   , volatile   , KEYALL)
-ALIAS("__volatile__" , volatile   , KEYALL)
+ALIAS("__alignof__"  , __alignof, KEYALL)
+ALIAS("__asm", asm  , KEYALL)
+ALIAS("__asm__"  , asm  , KEYALL)
+ALIAS("__attribute__", __attribute  , KEYALL)
+ALIAS("__complex", _Complex , KEYALL)
+ALIAS("__complex__"  , _Complex , KEYALL)
+ALIAS("__const"  , const, KEYALL)
+ALIAS("__const__", const, KEYALL)
+ALIAS("__decltype"   , decltype , KEYCXX)
+ALIAS("__imag__" , __imag   , KEYALL)
+ALIAS("__inline" , inline   , KEYALL)
+ALIAS("__inline__"   , inline   , KEYALL)
+ALIAS("__nullptr", nullptr  , KEYCXX)
+ALIAS("__real__" , __real   , KEYALL)
+ALIAS("__restrict"   , restrict , KEYALL)
+ALIAS("__restrict__" , restrict , KEYALL)
+ALIAS("__signed" , signed   , KEYALL)
+ALIAS("__signed__"   , signed   , KEYALL)
+ALIAS("__typeof" , typeof   , KEYALL)
+ALIAS("__typeof__"   , typeof   , KEYALL)
+ALIAS("__typeof_unqual"  , typeof_unqual, KEYNOCXX)
+ALIAS("__typeof_unqual__", typeof_unqual, KEYNOCXX)

h-vetinari wrote:

The C++ rejection should be questioned IMO. To my understanding, once upon a 
time C++ went with `decltype` to not steal `typeof` from C, waiting for WG14 to 
standardize it (and once that happened - admittedly decades later -, it was 
[explicitly](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2930.pdf) made 
more compatible with C++ during that process). Now that it's finally there, 
clang could reasonably expose this in all C/C++ modes, also without the leading 
underscores.

https://github.com/llvm/llvm-project/pull/87392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits