[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-12 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG211761332e43: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in… (authored by Stephen, committed by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-12 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good. Sorry for the delay. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/new/ https://reviews.llvm.org/D99543 _

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-03 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen marked an inline comment as done. Stephen added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-ignoreconversionfromtypes-option.cpp:12 + +typedef long long size_t; + njames93 wrote: > This

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-03 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen updated this revision to Diff 342472. Stephen added a comment. 1. Updating D99543 : [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck. # 2. Enter a brief description of the changes included in this update. 3.

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-ignoreconversionfromtypes-option.cpp:12 + +typedef long long size_t; + This is breaking tests on windows, It seems like its pre-defined

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-03 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen requested review of this revision. Stephen added a comment. Thanks, ymandel! Anything else, aaron.ballman or hokein? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/new/ https://reviews.llvm.org/D99543

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-05-03 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen updated this revision to Diff 342409. Stephen marked 2 inline comments as done. Stephen added a comment. Within clang-tidy's NarrowingConversionsCheck. - Allow opt-out of some common occurring patterns, such as: - Implicit casts between types of equivalent bit widths. - Implicit casts

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-29 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-narrowing-conversions.rst:51 + + Narrowing conversions from any type in this semicolon separat

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-16 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen updated this revision to Diff 338273. Stephen added a comment. (fix patch to include all local changes) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/new/ https://reviews.llvm.org/D99543 Files: clang-tools-extra/clang-tidy/cppcoreg

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-16 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen requested review of this revision. Stephen added a comment. Thanks for the review! I think I've addressed the comments -- hopefully I kept it inline with what you're thinking. Please have another look at your leisure. Comment at: clang-tools-extra/clang-tidy/cppcoregu

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-16 Thread Stephen Concannon via Phabricator via cfe-commits
Stephen updated this revision to Diff 338272. Stephen added a comment. - Add ability to pass semi-colon separated list of types to ignore, instead of assuming only size_type and difference_type. - Remove ability to avoid warnings on ::size() method, since it's subsumed by allowing narrowing conv

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. a small suggestion to simplify the tests. Comment at: clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-narrowing-conversions-equivalentbitwidth-off.cpp:1 +// RUN: %check_clang_tidy %s cppcoreguidelines-narrowing-conversions %t \ +// RUN: -co

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-13 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thanks! I think the changes generally LG, but I did have a question that might generate a small change. Comment at: clang-tools-extra/clang-tidy/cppcoreguidelines/NarrowingConversionsCheck.cpp:82 + const auto IsSizeTypeOrDifferenceType = hasTyp

[PATCH] D99543: [clang-tidy] Allow opt-in or out of some commonly occuring patterns in NarrowingConversionsCheck.

2021-04-13 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. But please wait for additional "Accept" from either `hokein` or `aaron.ballman`. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99543/n