File tree Expand file tree Collapse file tree 5 files changed +10
-0
lines changed
Units/parser-c.r/properties-thread.d Expand file tree Collapse file tree 5 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 11i input.c /^__thread int i;$/;" v typeref:typename:int properties:thread_local
22s input.c /^extern __thread struct state s;$/;" x typeref:struct:state properties:extern,thread_local
33p input.c /^static __thread char *p;$/;" v typeref:typename:char * file: properties:static,thread_local
4+ q input.c /^static _Thread_local char *q;$/;" v typeref:typename:char * file: properties:static,thread_local
Original file line number Diff line number Diff line change 22__thread int i ;
33extern __thread struct state s ;
44static __thread char * p ;
5+
6+ static _Thread_local char * q ;
Original file line number Diff line number Diff line change @@ -141,6 +141,11 @@ static CXXKeywordDescriptor g_aCXXKeywordTable[] = {
141141 CXXLanguageC | CXXLanguageCPP ,
142142 CXXKeywordMayAppearInVariableDeclaration | CXXKeywordExcludeFromTypeNames ,
143143 },
144+ {
145+ "_Thread_local" ,
146+ CXXLanguageC ,
147+ CXXKeywordMayAppearInVariableDeclaration | CXXKeywordExcludeFromTypeNames ,
148+ },
144149 {
145150 "alignas" ,
146151 CXXLanguageCPP ,
Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ typedef enum _CXXKeyword
3434 CXXKeyword__STDCALL , // Microsoft C/C++
3535 CXXKeyword__THISCALL , // Microsoft C/C++
3636 CXXKeyword__THREAD , // GCC (https://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Thread-Local.html#Thread-Local)
37+ CXXKeyword_THREAD_LOCAL , // C11
3738 CXXKeywordALIGNAS , // (since C++11)
3839 CXXKeywordALIGNOF , // (since C++11)
3940 //CXXKeywordAND,
Original file line number Diff line number Diff line change @@ -648,6 +648,7 @@ static bool cxxParserParseBlockInternal(bool bExpectClosingBracket)
648648 break ;
649649 case CXXKeywordTHREAD_LOCAL :
650650 case CXXKeyword__THREAD :
651+ case CXXKeyword_THREAD_LOCAL :
651652 g_cxx .uKeywordState |= CXXParserKeywordStateSeenThreadLocal ;
652653 break ;
653654
You can’t perform that action at this time.
0 commit comments