Fix finding Resource Dir#171
Merged
vgvassilev merged 3 commits intocompiler-research:mainfrom Nov 8, 2024
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #171 +/- ##
==========================================
+ Coverage 80.76% 80.78% +0.01%
==========================================
Files 19 19
Lines 972 973 +1
Branches 93 93
==========================================
+ Hits 785 786 +1
Misses 187 187
|
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
vgvassilev
requested changes
Nov 8, 2024
Contributor
vgvassilev
left a comment
There was a problem hiding this comment.
There is nothing wrong with the current approach: https://godbolt.org/z/5GzTeYo93 I do not think this needs fixing. Consider closing this PR.
vgvassilev
reviewed
Nov 8, 2024
Contributor
vgvassilev
left a comment
There was a problem hiding this comment.
I think I see what you mean, because we have an std::vector<const char*> we can't really use the operator== of std::string. Apologies for the oversight.
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
vgvassilev
reviewed
Nov 8, 2024
Co-authored-by: Vassil Vassilev <v.g.vassilev@gmail.com>
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
std::findoperates based on the operator==of the type being compared. Forconst char*, theoperator==compares the memory addresses (the pointer values), not the contents of the strings.Hence although we should fetch resource dir from the kernel.json file, we end up entering the block checking for resource dir and trying getting it through CppInterOp. This should not be the case.
Type of change
Please tick all options which are relevant.