Skip to content

Conversation

@danmar
Copy link
Owner

@danmar danmar commented Oct 27, 2025

No description provided.

@danmar danmar marked this pull request as draft October 27, 2025 14:35
@danmar
Copy link
Owner Author

danmar commented Oct 27, 2025

I will merge #7917 before I merge this PR. This PR should be extended..

@danmar danmar marked this pull request as ready for review October 27, 2025 17:36
@sonarqubecloud
Copy link

@danmar danmar requested a review from Copilot October 28, 2025 09:41
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 false positive warnings for unused private functions when they are marked with the __attribute__((unused)) attribute. The change extends the existing logic that handles [[maybe_unused]] to also recognize GCC's __attribute__((unused)) attribute.

Key Changes:

  • Extended the check for attribute-marked private functions to include __attribute__((unused)) in addition to [[maybe_unused]]
  • Added test cases covering both inline and out-of-line function definitions with the unused attribute

Reviewed Changes

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

File Description
lib/checkclass.cpp Updated privateFunctions() to skip functions marked with __attribute__((unused))
test/testunusedprivfunc.cpp Added test case attributeUnused() with coverage for both inline and out-of-line definitions

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

@danmar danmar merged commit 5fff5da into danmar:main Oct 28, 2025
55 checks passed
@danmar danmar deleted the fix-14129 branch November 1, 2025 20:30
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.

1 participant