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

A12-1-1: False positive on deleted constructors #720

Open
nbusser-sr opened this issue Sep 30, 2024 · 0 comments
Open

A12-1-1: False positive on deleted constructors #720

nbusser-sr opened this issue Sep 30, 2024 · 0 comments
Labels
false positive/false negative An issue related to observed false positives or false negatives.

Comments

@nbusser-sr
Copy link

nbusser-sr commented Sep 30, 2024

Affected rules

  • A12-1-1: cpp/autosar/explicit-constructor-base-class-initialization

Rule A12-1-1 (required, implementation, automated)
Constructors shall explicitly initialize all virtual base classes, all direct
non-virtual base classes and all non-static data members.

Description

A12-1-1 triggers on deleted constructors of an inherited class.

Example

class BaseClass {};

class InheritedClass final : public BaseClass {
    public:
    InheritedClass() = delete; // A12-1-1 warning

    InheritedClass(const InheritedClass&) = delete; // A12-1-1 warning

    InheritedClass(InheritedClass&&) = delete; // A12-1-1 warning
};
}
@nbusser-sr nbusser-sr added the false positive/false negative An issue related to observed false positives or false negatives. label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
false positive/false negative An issue related to observed false positives or false negatives.
Projects
None yet
Development

No branches or pull requests

1 participant