Skip to content
Commit 42d28be8 authored by Don Hinton's avatar Don Hinton
Browse files

[clang-tidy] modernize-loop-convert: impl const cast iter

Summary:
modernize-loop-convert was not detecting implicit casts to
const_iterator as convertible to range-based loops:

    std::vector<int> vec{1,2,3,4}
    for(std::vector<int>::const_iterator i = vec.begin();
        i != vec.end();
        ++i) { }

Thanks to Don Hinton for advice.

As well, this change adds a note for this check's applicability to code
targeting OpenMP prior to version 5 as this check will continue breaking
compilation with `-fopenmp`. Thanks to Roman Lebedev for pointing this
out.

Fixes PR#35082

Reviewed By: hintonda

Tags: #clang-tools-extra, #clang

Differential Revision: https://reviews.llvm.org/D61827

llvm-svn: 360785
parent 6ebb785b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment