Skip to content

Commit e99d7c6

Browse files
authored
fixed some -Wdeprecated-copy-dtor Clang compiler warnings (#4836)
1 parent 072e822 commit e99d7c6

5 files changed

Lines changed: 12 additions & 0 deletions

File tree

lib/analyzer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ struct Analyzer {
182182
/// Return analyzer for expression at token
183183
virtual ValuePtr<Analyzer> reanalyze(Token* tok, const std::string& msg = emptyString) const = 0;
184184
virtual ~Analyzer() {}
185+
Analyzer(const Analyzer&) = default;
186+
protected:
187+
Analyzer() = default;
185188
};
186189

187190
#endif

lib/ctu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ namespace CTU {
8383
{}
8484
CallBase(const Tokenizer *tokenizer, const Token *callToken);
8585
virtual ~CallBase() {}
86+
CallBase(const CallBase&) = default;
8687
std::string callId;
8788
int callArgNr{};
8889
std::string callFunctionName;

lib/importproject.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ class CPPCHECKLIB ImportProject {
8787

8888
ImportProject();
8989
virtual ~ImportProject() = default;
90+
ImportProject(const ImportProject&) = default;
91+
ImportProject& operator=(const ImportProject&) = default;
9092

9193
void selectOneVsConfig(cppcheck::Platform::PlatformType platform);
9294

lib/infer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ struct InferModel {
3434
virtual bool match(const ValueFlow::Value& value) const = 0;
3535
virtual ValueFlow::Value yield(MathLib::bigint value) const = 0;
3636
virtual ~InferModel() {}
37+
InferModel(const InferModel&) = default;
38+
protected:
39+
InferModel() = default;
3740
};
3841

3942
std::vector<ValueFlow::Value> infer(const ValuePtr<InferModel>& model,

lib/valueflow.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6497,6 +6497,9 @@ struct ConditionHandler {
64976497
});
64986498
}
64996499
virtual ~ConditionHandler() {}
6500+
ConditionHandler(const ConditionHandler&) = default;
6501+
protected:
6502+
ConditionHandler() = default;
65006503
};
65016504

65026505
static void valueFlowCondition(const ValuePtr<ConditionHandler>& handler,

0 commit comments

Comments
 (0)