File tree Expand file tree Collapse file tree 6 files changed +18
-0
lines changed
Units/parser-c.r/properties-thread.d Expand file tree Collapse file tree 6 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ --sort=no
2+ --kinds-c=*-{parameter}
3+ --fields=+x
4+ --fields-c=+{properties}
Original file line number Diff line number Diff line change 1+ i input.c /^__thread int i;$/;" v typeref:typename:int properties:thread_local
2+ s input.c /^extern __thread struct state s;$/;" x typeref:struct:state properties:extern,thread_local
3+ p input.c /^static __thread char *p;$/;" v typeref:typename:char * file: properties:static,thread_local
Original file line number Diff line number Diff line change 1+ /* Taken from https://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Thread-Local.html#Thread-Local */
2+ __thread int i ;
3+ extern __thread struct state s ;
4+ static __thread char * p ;
Original file line number Diff line number Diff line change @@ -136,6 +136,11 @@ static CXXKeywordDescriptor g_aCXXKeywordTable[] = {
136136 CXXLanguageCPP ,
137137 0
138138 },
139+ {
140+ "__thread" ,
141+ CXXLanguageC | CXXLanguageCPP ,
142+ CXXKeywordMayAppearInVariableDeclaration | CXXKeywordExcludeFromTypeNames ,
143+ },
139144 {
140145 "alignas" ,
141146 CXXLanguageCPP ,
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ typedef enum _CXXKeyword
3333 CXXKeyword__SHARED__ , // CUDA
3434 CXXKeyword__STDCALL , // Microsoft C/C++
3535 CXXKeyword__THISCALL , // Microsoft C/C++
36+ CXXKeyword__THREAD , // GCC (https://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Thread-Local.html#Thread-Local)
3637 CXXKeywordALIGNAS , // (since C++11)
3738 CXXKeywordALIGNOF , // (since C++11)
3839 //CXXKeywordAND,
Original file line number Diff line number Diff line change @@ -647,6 +647,7 @@ static bool cxxParserParseBlockInternal(bool bExpectClosingBracket)
647647 g_cxx .uKeywordState |= CXXParserKeywordStateSeenConstinit ;
648648 break ;
649649 case CXXKeywordTHREAD_LOCAL :
650+ case CXXKeyword__THREAD :
650651 g_cxx .uKeywordState |= CXXParserKeywordStateSeenThreadLocal ;
651652 break ;
652653
You can’t perform that action at this time.
0 commit comments