Skip to content
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

removed original filenames from TokenList and ErrorMessage::FileLocation / added missing ErrorMessage::FileLocation::mFile normalization / some cleanups #6182

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

firewave
Copy link
Collaborator

@firewave firewave commented Mar 24, 2024

The way ErrorMessage::FileLocation was created there was no case where the names were differed. That could only happen when those came from the TokenList.

The TokenList one could have only differed when TokenList::clangSetOrigFiles() was called. That copied the names over. It was only done in the Clang Import but the names were not touched afterwards so they never differed and this was completely unnecessary.

Also the way ErrorMessage::FileLocation was used in several cases the original name was never set at all.

The name was also not normalized in ErrorMessage::FileLocation when set via the constructor.

@firewave firewave marked this pull request as draft March 24, 2024 18:29
@firewave
Copy link
Collaborator Author

I went a bit overboard with the cleanups. I will pull out the unrelated changes into a separate PR.

I also think I miss a testcase of the empty original filename case.

@firewave
Copy link
Collaborator Author

firewave commented Apr 8, 2024

The original filename is actually different in TokenList when using -rp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant