-
Notifications
You must be signed in to change notification settings - Fork 75
Display origin of template instantiations #105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
vittorioromeo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be removed, was just for testing.
| DetailIndex file; | ||
| std::unordered_map<int, int> templateCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.