vgvassilev / clad

clad -- automatic differentiation for C/C++
GNU Lesser General Public License v3.0
266 stars 113 forks source link

Take StorageClass from the canonical decl when cloning functions #953

Closed PetroZarytskyi closed 2 weeks ago

PetroZarytskyi commented 2 weeks ago

When cloning functions, we have to take the StorageClass from the canonical declaration of the function. This matters when dealing with out-of-line defined functions. For example, only the first definition might have some qualifiers. To see an example, look at #951.

Fixes #951

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.80%. Comparing base (6168843) to head (8ec7760).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/vgvassilev/clad/pull/953/graphs/tree.svg?width=650&height=150&src=pr&token=9f6Q4em8hE&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev)](https://app.codecov.io/gh/vgvassilev/clad/pull/953?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) ```diff @@ Coverage Diff @@ ## master #953 +/- ## ========================================== - Coverage 93.80% 93.80% -0.01% ========================================== Files 55 55 Lines 7831 7830 -1 ========================================== - Hits 7346 7345 -1 Misses 485 485 ``` | [Files](https://app.codecov.io/gh/vgvassilev/clad/pull/953?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) | Coverage Δ | | |---|---|---| | [lib/Differentiator/DerivativeBuilder.cpp](https://app.codecov.io/gh/vgvassilev/clad/pull/953?src=pr&el=tree&filepath=lib%2FDifferentiator%2FDerivativeBuilder.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-bGliL0RpZmZlcmVudGlhdG9yL0Rlcml2YXRpdmVCdWlsZGVyLmNwcA==) | `100.00% <100.00%> (ø)` | | | [Files](https://app.codecov.io/gh/vgvassilev/clad/pull/953?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev) | Coverage Δ | | |---|---|---| | [lib/Differentiator/DerivativeBuilder.cpp](https://app.codecov.io/gh/vgvassilev/clad/pull/953?src=pr&el=tree&filepath=lib%2FDifferentiator%2FDerivativeBuilder.cpp&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Vassil+Vassilev#diff-bGliL0RpZmZlcmVudGlhdG9yL0Rlcml2YXRpdmVCdWlsZGVyLmNwcA==) | `100.00% <100.00%> (ø)` | |
github-actions[bot] commented 2 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"

github-actions[bot] commented 2 weeks ago

clang-tidy review says "All clean, LGTM! :+1:"