@@ -1435,7 +1435,7 @@ class ASTVisitor
1435
1435
ClassTemplateSpecializationDecl* spec)
1436
1436
{
1437
1437
if (Decl* primary = getInstantiatedFrom (spec->getSpecializedTemplate ()))
1438
- extractSymbolID (primary, I.Primary . emplace () );
1438
+ extractSymbolID (primary, I.Primary );
1439
1439
// KRYSTIAN NOTE: when this is a partial specialization, we could use
1440
1440
// ClassTemplatePartialSpecializationDecl::getTemplateArgsAsWritten
1441
1441
const TypeSourceInfo* type_written = spec->getTypeAsWritten ();
@@ -1458,7 +1458,7 @@ class ASTVisitor
1458
1458
// the USR of the templated VarDecl seems to be the correct one.
1459
1459
if (auto * primary = dyn_cast<VarTemplateDecl>(
1460
1460
getInstantiatedFrom (spec->getSpecializedTemplate ())))
1461
- extractSymbolID (primary->getTemplatedDecl (), I.Primary . emplace () );
1461
+ extractSymbolID (primary->getTemplatedDecl (), I.Primary );
1462
1462
const ASTTemplateArgumentListInfo* args_written = nullptr ;
1463
1463
// getTemplateArgsInfo returns nullptr for partial specializations,
1464
1464
// so we use getTemplateArgsAsWritten if this is a partial specialization
@@ -1480,7 +1480,7 @@ class ASTVisitor
1480
1480
{
1481
1481
// KRYSTIAN NOTE: do we need to check I->Primary.has_value()?
1482
1482
if (Decl* primary = getInstantiatedFrom (spec->getTemplate ()))
1483
- extractSymbolID (primary, I.Primary . emplace () );
1483
+ extractSymbolID (primary, I.Primary );
1484
1484
// TemplateArguments is used instead of TemplateArgumentsAsWritten
1485
1485
// because explicit specializations of function templates may have
1486
1486
// template arguments deduced from their return type and parameters
@@ -1498,7 +1498,7 @@ class ASTVisitor
1498
1498
candidates.size () == 1 )
1499
1499
{
1500
1500
if (Decl* primary = getInstantiatedFrom (candidates.front ()))
1501
- extractSymbolID (primary, I.Primary . emplace () );
1501
+ extractSymbolID (primary, I.Primary );
1502
1502
}
1503
1503
1504
1504
if (auto * args_written = spec->TemplateArgumentsAsWritten )
@@ -1801,7 +1801,7 @@ class ASTVisitor
1801
1801
switch (parent_context->getDeclKind ())
1802
1802
{
1803
1803
// the TranslationUnit DeclContext is the global namespace;
1804
- // it uses SymbolID::zero and should *always* exist
1804
+ // it uses SymbolID::global and should *always* exist
1805
1805
case Decl::TranslationUnit:
1806
1806
{
1807
1807
parent_id = SymbolID::global;
0 commit comments