Skip to content

Commit 981ee4a

Browse files
authored
Merge pull request #4 from SongRe/coroutine-fixes
Miscellaneous coroutine tagtype fixes
2 parents f2edec5 + 4114a2a commit 981ee4a

File tree

6 files changed

+5
-4
lines changed

6 files changed

+5
-4
lines changed

clang/lib/AST/ItaniumMangle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4361,6 +4361,7 @@ void CXXNameMangler::mangleType(const DependentNameType *T) {
43614361
break;
43624362
case ElaboratedTypeKeyword::Struct:
43634363
case ElaboratedTypeKeyword::Class:
4364+
case ElaboratedTypeKeyword::Coroutine:
43644365
case ElaboratedTypeKeyword::Interface:
43654366
Out << "Ts";
43664367
break;

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3244,6 +3244,7 @@ void MicrosoftCXXNameMangler::mangleTagTypeKind(TagTypeKind TTK) {
32443244
Out << 'U';
32453245
break;
32463246
case TagTypeKind::Class:
3247+
case TagTypeKind::Coroutine:
32473248
Out << 'V';
32483249
break;
32493250
case TagTypeKind::Enum:

clang/lib/Index/IndexSymbol.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ SymbolInfo index::getSymbolInfo(const Decl *D) {
112112
case TagTypeKind::Union:
113113
Info.Kind = SymbolKind::Union; break;
114114
case TagTypeKind::Class:
115+
case TagTypeKind::Coroutine:
115116
Info.Kind = SymbolKind::Class;
116117
Info.Lang = SymbolLanguage::CXX;
117118
break;

clang/lib/Sema/SemaCodeComplete.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,10 +1822,6 @@ static void AddTypeSpecifierResults(const LangOptions &LangOpts,
18221822
Results.AddResult(Result("_Coroutine", CCP_Type));
18231823
Results.AddResult(Result("wchar_t", CCP_Type));
18241824

1825-
Builder.AddTypedTextChunk("_Coroutine");
1826-
Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace);
1827-
Builder.AddInformativeChunk("A Coroutine, as defined by concurrency course.");
1828-
18291825
// typename name
18301826
Builder.AddTypedTextChunk("typename");
18311827
Builder.AddChunk(CodeCompletionString::CK_HorizontalSpace);

clang/lib/Sema/SemaType.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3244,6 +3244,7 @@ static QualType GetDeclSpecTypeForDeclarator(TypeProcessingState &state,
32443244
Error = Cxx ? 3 : 4; /* Union member */
32453245
break;
32463246
case TagTypeKind::Class:
3247+
case TagTypeKind::Coroutine:
32473248
Error = 5; /* Class member */
32483249
break;
32493250
case TagTypeKind::Interface:

clang/tools/libclang/CIndexCXX.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ enum CXCursorKind clang_getTemplateCursorKind(CXCursor C) {
6767
case TagTypeKind::Struct:
6868
return CXCursor_StructDecl;
6969
case TagTypeKind::Class:
70+
case TagTypeKind::Coroutine:
7071
return CXCursor_ClassDecl;
7172
case TagTypeKind::Union:
7273
return CXCursor_UnionDecl;

0 commit comments

Comments
 (0)