This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Fix false positive for cppcoreguidelines-init-variables
ClosedPublic

Authored by njames93 on Feb 1 2020, 3:17 PM.

Diff Detail

Event Timeline

njames93 created this revision.Feb 1 2020, 3:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2020, 3:17 PM
njames93 retitled this revision from [clang-tidt] Fix false positive for cppcoreguidelines-init-variables to [clang-tidy] Fix false positive for cppcoreguidelines-init-variables.Feb 1 2020, 3:19 PM
njames93 edited the summary of this revision. (Show Details)
njames93 added a project: Restricted Project.
njames93 marked an inline comment as done.Feb 1 2020, 3:21 PM
njames93 added inline comments.
clang-tools-extra/clang-tidy/cppcoreguidelines/InitVariablesCheck.cpp
37

No point checking if its a template definition or not. According to the standard it's not possible to have a for range statement where the loop variable isn't initialized.

Unit tests: pass. 62371 tests passed, 0 failed and 839 were skipped.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

This revision is now accepted and ready to land.Feb 2 2020, 10:18 AM
This revision was automatically updated to reflect the committed changes.