vgvassilev / clad

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

Fix clang tidy run failure in PR checks #918

Closed vaithak closed 4 months ago

vaithak commented 4 months ago

With LLVM and Clang >= 16, clang-tidy was returning the following error:

unknown argument: '-fno-lifetime-dse' [clang-diagnostic-error]
github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 4 months ago

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

codecov[bot] commented 4 months ago

Codecov Report

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

Project coverage is 94.05%. Comparing base (8039520) to head (d02359d).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/vgvassilev/clad/pull/918/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/918?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 #918 +/- ## ======================================= Coverage 94.05% 94.05% ======================================= Files 53 53 Lines 7722 7722 ======================================= Hits 7263 7263 Misses 459 459 ```
vgvassilev commented 4 months ago

unknown argument: '-fno-lifetime-dse'

This is a gcc-only flag and when we build the compilation database this becomes a problem. When running the clang-based tools such as clang-tidy we should build clad with clang to avoid propagating such flags.

github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 4 months ago

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

github-actions[bot] commented 4 months ago

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

vaithak commented 4 months ago

This is a gcc-only flag and when we build the compilation database this becomes a problem. When running the clang-based tools such as clang-tidy we should build clad with clang to avoid propagating such flags.

Fixed this 👍🏼