fixed some `-Wdeprecated-copy-dtor` Clang compiler warnings (#4836)

This commit is contained in:
Oliver Stöneberg 2023-03-02 21:02:29 +01:00 committed by GitHub
parent 072e822020
commit e99d7c6531
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 0 deletions

View File

@ -182,6 +182,9 @@ struct Analyzer {
/// Return analyzer for expression at token /// Return analyzer for expression at token
virtual ValuePtr<Analyzer> reanalyze(Token* tok, const std::string& msg = emptyString) const = 0; virtual ValuePtr<Analyzer> reanalyze(Token* tok, const std::string& msg = emptyString) const = 0;
virtual ~Analyzer() {} virtual ~Analyzer() {}
Analyzer(const Analyzer&) = default;
protected:
Analyzer() = default;
}; };
#endif #endif

View File

@ -83,6 +83,7 @@ namespace CTU {
{} {}
CallBase(const Tokenizer *tokenizer, const Token *callToken); CallBase(const Tokenizer *tokenizer, const Token *callToken);
virtual ~CallBase() {} virtual ~CallBase() {}
CallBase(const CallBase&) = default;
std::string callId; std::string callId;
int callArgNr{}; int callArgNr{};
std::string callFunctionName; std::string callFunctionName;

View File

@ -87,6 +87,8 @@ public:
ImportProject(); ImportProject();
virtual ~ImportProject() = default; virtual ~ImportProject() = default;
ImportProject(const ImportProject&) = default;
ImportProject& operator=(const ImportProject&) = default;
void selectOneVsConfig(cppcheck::Platform::PlatformType platform); void selectOneVsConfig(cppcheck::Platform::PlatformType platform);

View File

@ -34,6 +34,9 @@ struct InferModel {
virtual bool match(const ValueFlow::Value& value) const = 0; virtual bool match(const ValueFlow::Value& value) const = 0;
virtual ValueFlow::Value yield(MathLib::bigint value) const = 0; virtual ValueFlow::Value yield(MathLib::bigint value) const = 0;
virtual ~InferModel() {} virtual ~InferModel() {}
InferModel(const InferModel&) = default;
protected:
InferModel() = default;
}; };
std::vector<ValueFlow::Value> infer(const ValuePtr<InferModel>& model, std::vector<ValueFlow::Value> infer(const ValuePtr<InferModel>& model,

View File

@ -6497,6 +6497,9 @@ struct ConditionHandler {
}); });
} }
virtual ~ConditionHandler() {} virtual ~ConditionHandler() {}
ConditionHandler(const ConditionHandler&) = default;
protected:
ConditionHandler() = default;
}; };
static void valueFlowCondition(const ValuePtr<ConditionHandler>& handler, static void valueFlowCondition(const ValuePtr<ConditionHandler>& handler,