This is not enabled in the global-symbol-builder or dynamic index yet.
why this change? I think this makes us run generateUSR much more often (once per non-unique reference in *any* file, vs unique refeneces in main file), keeping track of a few extra referenced symbols by pointer should be much cheaper
drop the message unless it has something new to say
(why) do we require PP to be set if CollectMacro is false?
not sure what this means. Are you talking about code completion? This isn't CodeComplete :-)
Header guard macros are clearly not useful in the index, but are probably worth a comment. Builtin macros don't have useful locations, and also aren't needed for code completion as you say.
as above, can we avoid generating the USR for every reference?
I thought I needed to store both the name and the location in order to calculate USR for macros, and just calculating USRs seems easier and not too expensive. But after another look, it turned out that IdentifierInfo + Preprocessor would also work. Thanks for pressing on this! :)