[PATCH] D121412: Complete the list of single-underscore keywords for MSVC compat.
Eli Friedman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 14 10:07:14 PDT 2022
efriedma updated this revision to Diff 415136.
efriedma added a comment.
Use KEYMSCOMPAT
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121412/new/
https://reviews.llvm.org/D121412
Files:
clang/include/clang/Basic/TokenKinds.def
Index: clang/include/clang/Basic/TokenKinds.def
===================================================================
--- clang/include/clang/Basic/TokenKinds.def
+++ clang/include/clang/Basic/TokenKinds.def
@@ -676,24 +676,39 @@
KEYWORD(__virtual_inheritance , KEYMS)
KEYWORD(__interface , KEYMS)
ALIAS("__int8" , char , KEYMS)
-ALIAS("_int8" , char , KEYMS)
ALIAS("__int16" , short , KEYMS)
-ALIAS("_int16" , short , KEYMS)
ALIAS("__int32" , int , KEYMS)
-ALIAS("_int32" , int , KEYMS)
-ALIAS("_int64" , __int64 , KEYMS)
ALIAS("__wchar_t" , wchar_t , KEYMS)
-ALIAS("_asm" , asm , KEYMS)
-ALIAS("_alignof" , __alignof , KEYMS)
ALIAS("__builtin_alignof", __alignof , KEYMS)
-ALIAS("_cdecl" , __cdecl , KEYMS | KEYBORLAND)
-ALIAS("_fastcall" , __fastcall , KEYMS | KEYBORLAND)
-ALIAS("_stdcall" , __stdcall , KEYMS | KEYBORLAND)
-ALIAS("_thiscall" , __thiscall , KEYMS)
-ALIAS("_vectorcall" , __vectorcall, KEYMS)
-ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND)
-ALIAS("_inline" , inline , KEYMS)
-ALIAS("_declspec" , __declspec , KEYMS)
+
+// Microsoft single-underscore prefixed aliases for double-underscore prefixed
+// keywords.
+ALIAS("_asm" , asm , KEYMS)
+ALIAS("_alignof" , __alignof , KEYMS)
+ALIAS("_cdecl" , __cdecl , KEYMS | KEYBORLAND)
+ALIAS("_declspec" , __declspec , KEYMS)
+ALIAS("_fastcall" , __fastcall , KEYMS | KEYBORLAND)
+ALIAS("_finally" , __finally , KEYMSCOMPAT)
+ALIAS("_forceinline" , __forceinline, KEYMSCOMPAT)
+ALIAS("_inline" , inline , KEYMS)
+ALIAS("_int8" , char , KEYMS)
+ALIAS("_int16" , short , KEYMS)
+ALIAS("_int32" , int , KEYMS)
+ALIAS("_int64" , __int64 , KEYMS)
+ALIAS("_leave" , __leave , KEYMSCOMPAT)
+ALIAS("_multiple_inheritance", __multiple_inheritance, KEYMSCOMPAT)
+ALIAS("_ptr32" , __ptr32 , KEYMSCOMPAT)
+ALIAS("_ptr64" , __ptr64 , KEYMSCOMPAT)
+ALIAS("_restrict" , restrict , KEYMSCOMPAT)
+ALIAS("_stdcall" , __stdcall , KEYMS | KEYBORLAND)
+ALIAS("_thiscall" , __thiscall , KEYMS)
+ALIAS("_try" , __try , KEYMSCOMPAT)
+ALIAS("_vectorcall" , __vectorcall , KEYMS)
+ALIAS("_unaligned" , __unaligned , KEYMSCOMPAT)
+ALIAS("_uptr" , __uptr , KEYMSCOMPAT)
+ALIAS("_uuidof" , __uuidof , KEYMS | KEYBORLAND)
+ALIAS("_virtual_inheritance", __virtual_inheritance, KEYMSCOMPAT)
+ALIAS("_w64" , __w64 , KEYMSCOMPAT)
// Borland Extensions which should be disabled in strict conformance mode.
ALIAS("_pascal" , __pascal , KEYBORLAND)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121412.415136.patch
Type: text/x-patch
Size: 2960 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220314/2ef50d32/attachment.bin>
More information about the cfe-commits
mailing list