bloomberg / clangmetatool

A framework for reusing code in Clang tools
https://bloomberg.github.io/clangmetatool/
Apache License 2.0
119 stars 25 forks source link

Add collector for definitions #10

Closed HaltCatchFire closed 6 years ago

ruoso commented 6 years ago

Naming-wise, I don't think you need "Collector" in the name of the class, since it's already in the collectors namespace, at which point we can not abbreviate.

We probably should include in the name some information about the fact that it's collecting them and doing a "normalization" process.

HaltCatchFire commented 6 years ago

@ruoso

I removed the abbreviations; I'd previously abbreviated because "References" was abbreviated in "VariableRefs", so I thought "Defs" would be more consistent than "Definitions".

I agree that "Collector" doesn't make sense in the class name, so I removed that as well.

The code no longer does the normalization (that'll be done in an external tool), but it now maps "FileID"s to the "NamedDecl"s that were matched, so it might be a good idea to give that field a more descriptive name.

ruoso commented 6 years ago

This needs rebasing from master