Skip to content

Commit c620dd6

Browse files
committed
Fix CI failures
1 parent d630ae1 commit c620dd6

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎lib/importproject.cpp‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,6 +1528,8 @@ struct ImportProject::PropertyValueExpander {
15281528

15291529
PropertyValueExpander(ImportProject &project, const PropertiesMap &vars, std::string str, bool unknownAsEmpty = false)
15301530
: mProject(project), mVars(vars), mStr(std::move(str)), mUnknownAsEmpty(unknownAsEmpty) {}
1531+
PropertyValueExpander(const PropertyValueExpander &) = delete;
1532+
PropertyValueExpander &operator=(const PropertyValueExpander &) = delete;
15311533

15321534
bool hasValue(const std::string &name) const {
15331535
if (mVars.count(name))
@@ -2331,6 +2333,8 @@ class ImportProject::ConditionParser {
23312333
public:
23322334
ConditionParser(ImportProject &project, const std::string &condition, const PropertiesMap &properties)
23332335
: mProject(project), mCondition(condition), mVariables(properties) {}
2336+
ConditionParser(const ConditionParser &) = delete;
2337+
ConditionParser &operator=(const ConditionParser &) = delete;
23342338

23352339
bool parse() {
23362340
const std::string value = parseOr();
@@ -3116,6 +3120,8 @@ namespace {
31163120
, thisFileFullPath(properties["MSBuildThisFileFullPath"]) {
31173121
setMSBuildThis(filename, properties);
31183122
}
3123+
MSBuildThis(const MSBuildThis &) = delete;
3124+
MSBuildThis &operator=(const MSBuildThis &) = delete;
31193125

31203126
static void setMSBuildThis(const std::string &filename, PropertiesMap &properties) {
31213127
// Normalize once so all subsequent path ops can assume '/' separators.
@@ -3149,6 +3155,8 @@ namespace {
31493155
explicit DiscoveringGuard(bool &flag) : mFlag(flag) {
31503156
mFlag = true;
31513157
}
3158+
DiscoveringGuard(const DiscoveringGuard &) = delete;
3159+
DiscoveringGuard &operator=(const DiscoveringGuard &) = delete;
31523160

31533161
~DiscoveringGuard() {
31543162
mFlag = false;
@@ -3161,6 +3169,8 @@ namespace {
31613169

31623170
ImportStackGuard(std::unordered_set<std::string> &stack, std::string key)
31633171
: mStack(stack), mKey(std::move(key)) {}
3172+
ImportStackGuard(const ImportStackGuard &) = delete;
3173+
ImportStackGuard &operator=(const ImportStackGuard &) = delete;
31643174

31653175
~ImportStackGuard() {
31663176
mStack.erase(mKey);
@@ -3179,6 +3189,8 @@ namespace {
31793189
: mCurrent(current), mPrev(current) {
31803190
mCurrent = std::move(next);
31813191
}
3192+
CurrentFileGuard(const CurrentFileGuard &) = delete;
3193+
CurrentFileGuard &operator=(const CurrentFileGuard &) = delete;
31823194

31833195
~CurrentFileGuard() {
31843196
mCurrent = std::move(mPrev);

‎lib/symboldatabase.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1570,6 +1570,7 @@ void SymbolDatabase::createSymbolDatabaseIncompleteVars()
15701570
}
15711571
}
15721572

1573+
// cppcheck-suppress functionConst - has side effects
15731574
void SymbolDatabase::createSymbolDatabaseEscapeFunctions()
15741575
{
15751576
for (const Scope& scope : scopeList) {
@@ -1840,6 +1841,7 @@ void SymbolDatabase::createSymbolDatabaseExprIds()
18401841
}
18411842
}
18421843

1844+
// cppcheck-suppress functionConst - has side effects
18431845
void SymbolDatabase::setArrayDimensionsUsingValueFlow()
18441846
{
18451847
// set all unknown array dimensions

‎test/testrefthunk.cpp‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ class TestRefThunk : public TestFixture {
9191
int y = 2;
9292
RefThunk<int> p(x);
9393
const RefThunk<int> q(y);
94+
ASSERT(&p() == &x);
9495
p = q;
9596
ASSERT(&p() == &y);
9697
ASSERT_EQUALS(2, p());
@@ -100,6 +101,7 @@ class TestRefThunk : public TestFixture {
100101
int x = 1;
101102
int y = 2;
102103
RefThunk<int> p(x);
104+
ASSERT(&p() == &x);
103105
// assignment rebinds, like std::reference_wrapper - it does not write through
104106
p = y;
105107
ASSERT(&p() == &y);

0 commit comments

Comments
 (0)