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.
1 parent f5736ae commit d5ef2c0Copy full SHA for d5ef2c0
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