Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A12-8-6: Compiler generated special functions are not consistently flagged #811

Open
Labels
Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to address Impact-Medium false positive/false negativeAn issue related to observed false positives or false negatives.
@lcartey

Description

Affected rules

  • A12-8-6

Description

Compiler generated special functions are not always flagged by this rule, because the extractor does not always generate them.

In CodeQL CLI v2.16.6 and before, this mainly affected non-template classes. However, after the upgrade to CodeQL CLI v2.18.4, special functions are not consistently generated for template classes either.

This can be addressed by extending the TrivialType library to support additional cases where the function would be compiler generated, but where it currently isn't detected.

Example

class BaseClass2 {}; // NON_COMPLIANT - compiler generated move and assignment
template <class T> class BaseClass9 { // NON_COMPLIANT

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to address Impact-Medium false positive/false negativeAn issue related to observed false positives or false negatives.

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /