D5911 added support for profiling clang-tidy checks.
It works nice, the tabulated report generated by clang-tidy -enable-check-profile is readable.
Unfortunately, it gets complicated with more than just one source file.
You could run clang-tidy on each file, then parse the profiles,
combine (sum) based on the Name column, and re-display.
Given that the profiles are display friendly, this is messy. (or is there a tool i've missed?)
Or, you could run clang-tidy only once, on all the sources at at once.
This obviously does not scale well. But one would think at least
it would sidestep the problem of combining the separate reports.
One would think. No, it does not. The profiling info is displayed,
only once at the end of clang-tidy run, but the info is garbage.
It only contains some portion of the data. I suspect it only contains the last TU.
This is because MatchASTVisitor is kinda smart, it contains it's own local
llvm::StringMap<llvm::TimeRecord> TimeByBucket;, which is used,
and at the end, MatchASTVisitor::~MatchASTVisitor() "propagates"
the collected data to the specified profiling info storage.
But it overrides it, not appends/combines...