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

[clang-tidy] cert-err33-c false positive on user-defined function named timer #121607

Open
LegalizeAdulthood opened this issue Jan 3, 2025 · 1 comment
Labels
clang-tidy false-positive Warning fires when it should not

Comments

@LegalizeAdulthood
Copy link
Contributor

  1. git clone https://github.com/LegalizeAdulthood/iterated-dynamics
  2. git checkout 53c6c9909e2d2e320ccedc55e9ed2d59fbcb1705
  3. configure CMake project, optionally using the provided CMakePresets.json
  4. Browse to libid/bifurcation.cpp, line 471 on the call to the timer function
  5. IDEs (and presumably clang-tidy from the command-line) flag the call to timer as a cert-err33-c violation
  6. The documentation doesn't list the function timer as one that would be flagged by this check
  7. Even if a system function called timer (I couldn't find any such function) existed, if a user-defined overload is distinguished from the system function, then it still shouldn't be flagged as a violation.

Image

@LegalizeAdulthood LegalizeAdulthood added clang-tidy false-positive Warning fires when it should not labels Jan 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 3, 2025

@llvm/issue-subscribers-clang-tidy

Author: Richard Thomson (LegalizeAdulthood)

1. `git clone https://github.com/LegalizeAdulthood/iterated-dynamics` 2. `git checkout 53c6c9909e2d2e320ccedc55e9ed2d59fbcb1705` 3. configure CMake project, optionally using the provided `CMakePresets.json` 4. Browse to `libid/bifurcation.cpp`, line 471 on the call to the `timer` function 5. IDEs (and presumably clang-tidy from the command-line) flag the call to `timer` as a `cert-err33-c` violation 6. The documentation doesn't list the function `timer` as one that would be flagged by this check 7. Even if a system function called `timer` (I couldn't find any such function) existed, if a user-defined overload is distinguished from the system function, then it still shouldn't be flagged as a violation.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy false-positive Warning fires when it should not
Projects
None yet
Development

No branches or pull requests

2 participants