We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a80ef8b + d5ef2c0 commit f0375f5Copy full SHA for f0375f5
clang/lib/AST/VTableBuilder.cpp
@@ -3831,8 +3831,8 @@ const VirtualBaseInfo &MicrosoftVTableContext::computeVBTableRelatedInformation(
3831
unsigned VBTableIndex = 1 + VBI->VBTableIndices.size();
3832
for (const auto &VB : RD->vbases()) {
3833
const CXXRecordDecl *CurVBase = VB.getType()->getAsCXXRecordDecl();
3834
- if (!VBI->VBTableIndices.count(CurVBase))
3835
- VBI->VBTableIndices[CurVBase] = VBTableIndex++;
+ if (VBI->VBTableIndices.try_emplace(CurVBase, VBTableIndex).second)
+ ++VBTableIndex;
3836
}
3837
3838
return *VBI;
0 commit comments