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

Respect shadow declarations when writing propagators. #1171

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Conversation

vgvassilev
Copy link
Owner

@vgvassilev vgvassilev commented Dec 14, 2024

In cases where the public declaration is introduced with using declaration pointing to an internal namespace with the implementation details, we should put the propagator function in the namespace of the public function and not the implementation. That would allow users to position their pullbacks in the same namespace structure as the used functions.

Depends on #1172

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/Differentiator/DerivativeBuilder.cpp Outdated Show resolved Hide resolved
lib/Differentiator/DerivativeBuilder.cpp Outdated Show resolved Hide resolved
lib/Differentiator/DerivativeBuilder.cpp Outdated Show resolved Hide resolved
lib/Differentiator/DerivativeBuilder.cpp Outdated Show resolved Hide resolved
lib/Differentiator/DerivativeBuilder.cpp Outdated Show resolved Hide resolved
lib/Differentiator/DerivativeBuilder.cpp Outdated Show resolved Hide resolved
lib/Differentiator/ReverseModeVisitor.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

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

@vgvassilev vgvassilev force-pushed the fix-shadows branch 2 times, most recently from 58d68d6 to a754eda Compare December 15, 2024 19:22
Copy link
Contributor

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

Copy link
Contributor

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

Copy link

codecov bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.57%. Comparing base (41e9f2f) to head (546c8d6).
Report is 4 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1171      +/-   ##
==========================================
+ Coverage   94.56%   94.57%   +0.01%     
==========================================
  Files          51       51              
  Lines        8942     8959      +17     
==========================================
+ Hits         8456     8473      +17     
  Misses        486      486              
Files with missing lines Coverage Δ
include/clad/Differentiator/DerivativeBuilder.h 100.00% <ø> (ø)
include/clad/Differentiator/ReverseModeVisitor.h 96.55% <ø> (ø)
lib/Differentiator/BaseForwardModeVisitor.cpp 98.76% <100.00%> (-0.01%) ⬇️
lib/Differentiator/DerivativeBuilder.cpp 100.00% <100.00%> (ø)
lib/Differentiator/ReverseModeVisitor.cpp 95.59% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
include/clad/Differentiator/DerivativeBuilder.h 100.00% <ø> (ø)
include/clad/Differentiator/ReverseModeVisitor.h 96.55% <ø> (ø)
lib/Differentiator/BaseForwardModeVisitor.cpp 98.76% <100.00%> (-0.01%) ⬇️
lib/Differentiator/DerivativeBuilder.cpp 100.00% <100.00%> (ø)
lib/Differentiator/ReverseModeVisitor.cpp 95.59% <100.00%> (+<0.01%) ⬆️

Copy link
Contributor

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

@vgvassilev vgvassilev marked this pull request as ready for review December 15, 2024 20:37
In cases where the public declaration is introduced with using declaration
pointing to an internal namespace with the implementation details, we should
put the propagator function in the namespace of the public function and not the
implementation. That would allow users to position their pullbacks in the same
namespace structure as the used functions.
Copy link
Contributor

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

@PetroZarytskyi
Copy link
Collaborator

LGTM!

@vgvassilev vgvassilev merged commit 744ef6c into master Dec 16, 2024
90 checks passed
@vgvassilev vgvassilev deleted the fix-shadows branch December 16, 2024 21:38
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