Skip to content

clang-tidy: modernize-loop-convert#7790

Merged
mattklein123 merged 7 commits intoenvoyproxy:masterfrom
derekargueta:dereka/clang-tidy-modernize-loop-convert
Aug 3, 2019
Merged

clang-tidy: modernize-loop-convert#7790
mattklein123 merged 7 commits intoenvoyproxy:masterfrom
derekargueta:dereka/clang-tidy-modernize-loop-convert

Conversation

@derekargueta
Copy link
Member

Description: Enable and fix existing cases of modernize-loop-convert. This clang-tidy check looks for raw for-loops that can be replaced with range-based loops.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-loop-convert.html
There are a few configuration options for this check (see above link for more details) but I think the defaults are perfectly suitable.
Risk Level: Low
Testing: Existing
Docs Changes: N/A
Release Notes: N/A
[Optional Fixes #Issue]
[Optional Deprecated:]

Signed-off-by: Derek Argueta dereka@pinterest.com

Signed-off-by: Derek Argueta <dereka@pinterest.com>
Signed-off-by: Derek Argueta <dereka@pinterest.com>
Signed-off-by: Derek Argueta <dereka@pinterest.com>
Signed-off-by: Derek Argueta <dereka@pinterest.com>
Signed-off-by: Derek Argueta <dereka@pinterest.com>
Signed-off-by: Derek Argueta <dereka@pinterest.com>
@derekargueta
Copy link
Member Author

/retest

@repokitteh-read-only
Copy link

🔨 rebuilding ci/circleci: clang_tidy (failed build)

🐱

Caused by: a #7790 (comment) was created by @derekargueta.

see: more, trace.

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

LGTM with small typo, thanks!

/wait


for (auto it = policies_.begin(); it != policies_.end(); it++) {
if (it->second.matches(connection, headers, metadata)) {
for (const auto& policie : policies_) {
Copy link
Member

Choose a reason for hiding this comment

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

a/policie/policy

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, wonder why spelling CI didn't catch this when it caught another one that was very similar: 5203b0e

@mattklein123 mattklein123 self-assigned this Aug 2, 2019
Signed-off-by: Derek Argueta <dereka@pinterest.com>
@mattklein123 mattklein123 merged commit 2ca5b26 into envoyproxy:master Aug 3, 2019
@derekargueta derekargueta deleted the dereka/clang-tidy-modernize-loop-convert branch November 26, 2019 10:53
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.

3 participants