Skip to content

Commit 75310f7

Browse files
committed
[clang] Fix Mame Mangling Crashes
1 parent f3e6473 commit 75310f7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

clang/lib/AST/ItaniumMangle.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,6 +1088,16 @@ void CXXNameMangler::mangleNameWithAbiTags(GlobalDecl GD,
10881088
return;
10891089
}
10901090

1091+
const RecordDecl *RD = GetLocalClassDecl(GD.getDecl());
1092+
if(RD){
1093+
const DeclContext *DC = Context.getEffectiveDeclContext(RD);
1094+
const FunctionDecl* FD = dyn_cast<FunctionDecl>(DC);
1095+
if(FD->getTrailingRequiresClause() && IsLambda){
1096+
mangleNestedName(GD, DC, AdditionalAbiTags);
1097+
return;
1098+
}
1099+
}
1100+
10911101
if (isLocalContainerContext(DC)) {
10921102
mangleLocalName(GD, AdditionalAbiTags);
10931103
return;

0 commit comments

Comments
 (0)