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

Update GetDatamembers and GetUnderlyingScope to work with UsingShadowDecl #385

Merged

Conversation

Vipul-Cariappa
Copy link
Collaborator

Description

GetDatamembers now also returns UsingShadowDecl that point to FieldDecl.

Update GetUnderlyingScope to return the target Decl of using statements.

Simplified CheckVariableAccess logic.

Fixes

Towards fixing test14_protected_access in cppyy.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

lib/Interpreter/CppInterOp.cpp Outdated Show resolved Hide resolved
lib/Interpreter/CppInterOp.cpp Show resolved Hide resolved
@Vipul-Cariappa Vipul-Cariappa force-pushed the dev/Protected-Using branch 2 times, most recently from 17e6475 to 9a4c472 Compare December 9, 2024 13:47
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

lib/Interpreter/CppInterOp.cpp Show resolved Hide resolved
lib/Interpreter/CppInterOp.cpp Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Dec 9, 2024

clang-tidy review says "All clean, LGTM! 👍"

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.62%. Comparing base (557e048) to head (e943f38).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
+ Coverage   70.56%   70.62%   +0.06%     
==========================================
  Files           9        9              
  Lines        3496     3500       +4     
==========================================
+ Hits         2467     2472       +5     
+ Misses       1029     1028       -1     
Files with missing lines Coverage Δ
lib/Interpreter/CppInterOp.cpp 79.90% <100.00%> (+0.09%) ⬆️
Files with missing lines Coverage Δ
lib/Interpreter/CppInterOp.cpp 79.90% <100.00%> (+0.09%) ⬆️

@Vipul-Cariappa
Copy link
Collaborator Author

Vipul-Cariappa commented Dec 9, 2024

Seg faults at cppyy without the patch for cppyy-backend.
Should be safe to merge.

EDIT
Opened PR fixing cppyy-backend at compiler-research/cppyy-backend#117

Vipul-Cariappa added a commit to Vipul-Cariappa/cppyy-backend-compiler-research that referenced this pull request Dec 9, 2024
Since `Cpp::GetDatamembers` can potentially return `UsingShadowDecl` (compiler-research/CppInterOp#385),
we will need to process datamembers through `GetUnderlyingScope`
Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM mod comments.

lib/Interpreter/CppInterOp.cpp Outdated Show resolved Hide resolved
lib/Interpreter/CppInterOp.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

…hadowDecl`

`GetDatamembers` now also returns `UsingShadowDecl` that point to `FieldDecl`.

Update `GetUnderlyingScope` to return the target Decl of using statements.

Simplified `CheckVariableAccess` logic.
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@Vipul-Cariappa Vipul-Cariappa merged commit 70daba2 into compiler-research:main Dec 11, 2024
44 checks passed
@Vipul-Cariappa Vipul-Cariappa deleted the dev/Protected-Using branch December 11, 2024 06:59
Vipul-Cariappa added a commit to Vipul-Cariappa/cppyy-compiler-research that referenced this pull request Dec 11, 2024
Vipul-Cariappa added a commit to compiler-research/cppyy that referenced this pull request Dec 11, 2024
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.

2 participants