Skip to content

Fix #11595 FN useStlAlgorithm with complex condition#4848

Merged
danmar merged 6 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Fix11595
Mar 4, 2023
Merged

Fix #11595 FN useStlAlgorithm with complex condition#4848
danmar merged 6 commits intocppcheck-opensource:mainfrom
chrchr-github:chr_Fix11595

Conversation

@chrchr-github
Copy link
Copy Markdown
Collaborator

readability-use-anyofallof cannot be enabled yet because of these FNs:

/home/runner/work/cppcheck/cppcheck/lib/valueflow.cpp:2249:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (const ValueFlow::Value &val : values) {
    ^
/home/runner/work/cppcheck/cppcheck/lib/valueflow.cpp:2981:9: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
        for (const auto&p:getVars()) {
        ^
/home/runner/work/cppcheck/cppcheck/lib/valueflow.cpp:5706:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (auto&& x : c1) {
    ^
clang-tidy-16 -p=/home/runner/work/cppcheck/cppcheck/cmake.output -quiet /home/runner/work/cppcheck/cppcheck/lib/cppcheck.cpp
/home/runner/work/cppcheck/cppcheck/lib/cppcheck.cpp:1147:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (const Settings::Rule &rule : mSettings.rules) {
    ^
/home/runner/work/cppcheck/cppcheck/lib/symboldatabase.cpp:5126:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (const Scope *s : nestedList) {
    ^
clang-tidy-16 -p=/home/runner/work/cppcheck/cppcheck/cmake.output -quiet /home/runner/work/cppcheck/cppcheck/lib/checkstl.cpp
/home/runner/work/cppcheck/cppcheck/lib/checkstl.cpp:2883:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (const ValueFlow::Value& v:tok->values()) {
    ^
clang-tidy-16 -p=/home/runner/work/cppcheck/cppcheck/cmake.output -quiet /home/runner/work/cppcheck/cppcheck/lib/checkclass.cpp
/home/runner/work/cppcheck/cppcheck/lib/checkclass.cpp:116:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (const Type::BaseInfo &baseInfo: type->derivedFrom) {
    ^
clang-tidy-16 -p=/home/runner/work/cppcheck/cppcheck/cmake.output -quiet /home/runner/work/cppcheck/cppcheck/lib/astutils.cpp
/home/runner/work/cppcheck/cppcheck/lib/astutils.cpp:955:5: error: replace loop by 'std::any_of()' [readability-use-anyofallof,-warnings-as-errors]
    for (const ValueFlow::Value &val : tok->values()) {
        ^

@danmar danmar merged commit 9291421 into cppcheck-opensource:main Mar 4, 2023
@chrchr-github chrchr-github deleted the chr_Fix11595 branch March 13, 2023 11:38
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