Display origin of template instantiations#105
Display origin of template instantiations#105vittorioromeo wants to merge 3 commits intoaras-p:mainfrom
Conversation
vittorioromeo
left a comment
There was a problem hiding this comment.
Some questions for @aras-p
src/Analysis.cpp
Outdated
| // Clang Build Analyzer https://github.com/aras-p/ClangBuildAnalyzer | ||
| // SPDX-License-Identifier: Unlicense | ||
|
|
||
| #include <iostream> |
There was a problem hiding this comment.
This will be removed, was just for testing.
| DetailIndex file; | ||
| std::unordered_map<int, int> templateCount; |
There was a problem hiding this comment.
I don't like this approach, but I need guidance on where these things should go.
| if (ev.filenameDetailIndex.idx != 0) | ||
| { | ||
| assert(ev.filenameDetailIndex.idx >= 0); | ||
| assert(ev.filenameDetailIndex.idx < static_cast<int>(nameToIndex.size())); | ||
| ev.filenameDetailIndex = detailRemap[ev.filenameDetailIndex]; | ||
| assert(ev.filenameDetailIndex.idx >= 0); | ||
| assert(ev.filenameDetailIndex.idx < static_cast<int>(resultNameToIndex.size())); | ||
| } |
There was a problem hiding this comment.
Is there a way we can avoid adding the extra field?
| // use the current json file name for the "instantiateX" event filename detail | ||
| if (event.type == BuildEventType::kInstantiateClass || event.type == BuildEventType::kInstantiateFunction) | ||
| filenameDetailPtr = curFileName; |
There was a problem hiding this comment.
Can we get more precise information other than the event filename, somehow?
|
My executable used to capture was out of sync with my executable used for analysis. |
|
@aras-p: any interest in getting this PR improved and merged? |
Addresses #93. Could be improved in the future, but it's already quite useful. Example output:
This PR needs work, but I'd like to get some feedback first on how to proceed. It's mostly a hack at this point.