Skip to content

testrunner: reduced usage of mutable Settings / some cleanups#5909

Merged
firewave merged 2 commits into
cppcheck-opensource:mainfrom
firewave:symdb-2
Jan 31, 2024
Merged

testrunner: reduced usage of mutable Settings / some cleanups#5909
firewave merged 2 commits into
cppcheck-opensource:mainfrom
firewave:symdb-2

Conversation

@firewave
Copy link
Copy Markdown
Collaborator

No description provided.

@firewave firewave force-pushed the symdb-2 branch 2 times, most recently from 85c54f4 to 1287363 Compare January 23, 2024 00:21
Comment thread test/testclass.cpp
// Clear the error log
errout.str("");

Preprocessor preprocessor(settings0);
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was relying on the modifications checkVirtualDestructor() did.

Comment thread test/testother.cpp
}

{
Settings s = settingsBuilder().checkUnusedTemplates().build();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary as checkUnusedTemplates is true by default.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now uses _settings which has std.cfg loaded but I do think this is not an issue.

Comment thread test/testother.cpp
}

void forwardAndUsed() {
Settings s = settingsBuilder().checkUnusedTemplates().build();
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary as checkUnusedTemplates is true by default.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now uses _settings which has std.cfg loaded but I do think this is not an issue.

Comment thread test/testvalueflow.cpp
const char *code;
std::vector<std::string> lifetimes;

LOAD_LIB_2(settings.library, "std.cfg");
Copy link
Copy Markdown
Collaborator Author

@firewave firewave Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary as std.cfg is already loaded in settings.

Comment thread test/testvalueflow.cpp

// ~
code = "x = ~0U;";
PLATFORM(settings.platform, Platform::Type::Native); // ensure platform is native
Copy link
Copy Markdown
Collaborator Author

@firewave firewave Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obsolete as we now default to Native on all platforms.

Comment thread test/testvalueflow.cpp
void valueFlowContainerSize() {
const char *code;

LOAD_LIB_2(settings.library, "std.cfg");
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary as std.cfg is already loaded in settings.

Comment thread test/testvalueflow.cpp
{
const char* code;

LOAD_LIB_2(settings.library, "std.cfg");
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary as std.cfg is already loaded in settings.

Comment thread test/testvalueflow.cpp
void valueFlowDynamicBufferSize() {
const char *code;

LOAD_LIB_2(settings.library, "std.cfg");
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary as std.cfg is already loaded in settings.

@firewave firewave merged commit e3f0676 into cppcheck-opensource:main Jan 31, 2024
@firewave firewave deleted the symdb-2 branch January 31, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants