================
@@ -358,7 +359,8 @@ serializeCommonAttributes(const Info &I, json::Object &Obj,
                           const std::optional<StringRef> RepositoryUrl,
                           const std::optional<StringRef> RepositoryLinePrefix) 
{
   insertNonEmpty("Name", I.Name, Obj);
-  Obj["USR"] = toHex(toStringRef(I.USR));
+  if (!(I.USR == GlobalNamespaceID))
+    Obj["USR"] = toHex(toStringRef(I.USR));
----------------
ilovepi wrote:

What's the point of this specialization? Can't any consumer just check the USR 
against the known sentinel value? I'd think this would make everything else 
more expensive, since USR isn't guaranteed to exist in the output, and now the 
schema is customized on if its present or not...

https://github.com/llvm/llvm-project/pull/177221
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to