Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/CI-unixish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, macos-15]
cxxstd: [14, 17]
cxxstd: [14, 17, 20]
# FIXME: macos-15 fails to compile with C++20
#
# /Users/runner/work/cppcheck/cppcheck/cmake.output/gui/test/projectfile/moc_testprojectfile.cpp:84:1: error: 'constinit' specifier is incompatible with C++ standards before C++20 [-Werror,-Wc++20-compat]
# 84 | Q_CONSTINIT const QMetaObject TestProjectFile::staticMetaObject = { {
# | ^
# /opt/homebrew/opt/qt/lib/QtCore.framework/Headers/qcompilerdetection.h:1409:23: note: expanded from macro 'Q_CONSTINIT'
exclude:
- os: macos-15
cxxstd: 20
fail-fast: false # Prefer quick result

runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
strategy:
matrix:
os: [windows-2022, windows-2025]
cxxstd: [14, 17]
cxxstd: [14, 17, 20]
Copy link
Owner

Choose a reason for hiding this comment

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

feel free to continue adding more c++ versions here.. I like that we are compliant..

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

C++23 is currently blocked by a long-standing Clang bug: https://trac.cppcheck.net/ticket/14353.

fail-fast: false

runs-on: ${{ matrix.os }}
Expand Down
4 changes: 2 additions & 2 deletions gui/resultstree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,15 +713,15 @@ void ResultsTree::contextMenuEvent(QContextMenuEvent * e)
{
auto *action = new QAction(tr("No tag"), tagMenu);
tagMenu->addAction(action);
connect(action, &QAction::triggered, [=]() {
connect(action, &QAction::triggered, [this]() {
tagSelectedItems(QString());
});
}

for (const QString& tagstr : currentProject->getTags()) {
auto *action = new QAction(tagstr, tagMenu);
tagMenu->addAction(action);
connect(action, &QAction::triggered, [=]() {
connect(action, &QAction::triggered, [tagstr, this]() {
tagSelectedItems(tagstr);
});
}
Expand Down
2 changes: 1 addition & 1 deletion lib/pathmatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ PathMatch::PathMatch(std::vector<std::string> patterns, std::string basepath, Sy

bool PathMatch::match(const std::string &path, Filemode mode) const
{
return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [=] (const std::string &pattern) {
return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [&] (const std::string &pattern) {
return match(pattern, path, mBasepath, mode, mSyntax);
});
}
Expand Down
Loading