@@ -59,18 +59,18 @@ bool MapASTVisitor::mapDecl(const T *D, bool IsDefinition) {
59
59
bool IsFileInRootDir;
60
60
llvm::SmallString<128 > File =
61
61
getFile (D, D->getASTContext (), CDCtx.SourceRoot , IsFileInRootDir);
62
- auto I = serialize::emitInfo (D, getComment (D, D-> getASTContext ()),
63
- getLine (D, D->getASTContext ()), File ,
64
- IsFileInRootDir, CDCtx.PublicOnly );
65
-
66
- // A null in place of I indicates that the serializer is skipping this decl
67
- // for some reason (e.g. we're only reporting public decls).
68
- if (I. first )
69
- CDCtx.ECtx ->reportResult (llvm::toHex (llvm::toStringRef (I. first ->USR )),
70
- serialize::serialize (I. first ));
71
- if (I. second )
72
- CDCtx.ECtx ->reportResult (llvm::toHex (llvm::toStringRef (I. second ->USR )),
73
- serialize::serialize (I. second ));
62
+ auto [Child, Parent] = serialize::emitInfo (
63
+ D, getComment (D, D-> getASTContext ()), getLine (D, D->getASTContext ()),
64
+ File, IsFileInRootDir, CDCtx.PublicOnly );
65
+
66
+ // A null in place of a valid Info indicates that the serializer is skipping
67
+ // this decl for some reason (e.g. we're only reporting public decls).
68
+ if (Child )
69
+ CDCtx.ECtx ->reportResult (llvm::toHex (llvm::toStringRef (Child ->USR )),
70
+ serialize::serialize (Child ));
71
+ if (Parent )
72
+ CDCtx.ECtx ->reportResult (llvm::toHex (llvm::toStringRef (Parent ->USR )),
73
+ serialize::serialize (Parent ));
74
74
return true ;
75
75
}
76
76
0 commit comments