Skip to content

Conversation

@aaronliu0130
Copy link
Member

Fixes #354

this shall be squashed

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a false positive in the C-style cast checker where function pointers with noexcept specifiers were incorrectly flagged as deprecated casts. The fix adds noexcept to the list of keywords that indicate a function declaration rather than a cast.

  • Adds noexcept to the regex pattern that identifies function declarations
  • Updates the comment to clarify that function pointers are handled
  • Adds a test case for function pointers with noexcept specifiers

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cpplint.py Modified regex pattern to include noexcept as a keyword indicating function declarations and updated comment for clarity
cpplint_unittest.py Added test case for function pointer with noexcept specifier to verify the fix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

[readability/casting] casting detection mistake when function pointer with pointer argument meet "noexcept".

2 participants