fixed #14347 - fixed Clang warnings in C++20 build#8021
fixed #14347 - fixed Clang warnings in C++20 build#8021firewave merged 3 commits intodanmar:mainfrom
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
774d19d to
7a010b5
Compare
-Wdeprecated-this-capture Clang C++20 warning|
The CI jobs will not trigger the warnings which have been fixed by this. A Clang build is implicitly performed by the clang-tidy job. We could switch that job to a higher standard (C++23 even) and adjust the configuration accordingly. This would also allow us to introduce some more conditional modernizations. |
2260091 to
c107e0e
Compare
not true - macOS obviously uses Clang... |
|
The C++20 builds fails for macOS: |
9fb3f5d to
a7306be
Compare
example:
```
/home/user/CLionProjects/cppcheck/lib/pathmatch.cpp:37:37: warning: implicit capture of 'this' with a capture default of '=' is deprecated [-Wdeprecated-this-capture]
37 | return match(pattern, path, mBasepath, mode, mSyntax);
| ^
/home/user/CLionProjects/cppcheck/lib/pathmatch.cpp:36:63: note: add an explicit capture of 'this' to capture '*this' by reference
36 | return std::any_of(mPatterns.cbegin(), mPatterns.cend(), [=] (const std::string &pattern) {
| ^
| , this
```
Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
|
| matrix: | ||
| os: [windows-2022, windows-2025] | ||
| cxxstd: [14, 17] | ||
| cxxstd: [14, 17, 20] |
There was a problem hiding this comment.
feel free to continue adding more c++ versions here.. I like that we are compliant..
There was a problem hiding this comment.
C++23 is currently blocked by a long-standing Clang bug: https://trac.cppcheck.net/ticket/14353.



No description provided.