`RULE-0-2-1`: Incorrectly labeled unused member function on template

Open
#1,158 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
cpp
Domain
devtools

Research direction

Start by locating the implementation and tests for RULE-0-2-1, then reproduce the report with the provided uninstantiated C++ template example. Compare the diagnostic with the intended handling of member functions in uninstantiated templates; done means the example and the reported QLX cases no longer receive an incorrect unused-member warning.

Written by the indexing model from the issue text.

Description

false positive/false negative
Affected rules
  • RULE-0-2-1
Description

This is occurring in a few places in QLX. It seems to be caused by uninstantiated templates but not positive.

Example

Likely caused by cases such as:

template <typename T>
class C {
  int x;
  void f() { x; }
};
Dominant language
CodeQL
Stars
227
Forks
82
Avg merge
6d 7h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/codeql-coding-standards

All issues in github/codeql-coding-standards

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.