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

Stephen Concannon via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 3 11:14:49 PDT 2021


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 is breaking tests on windows, It seems like its pre-defined to be `unsigned long long` on windows.
> Simplest fix is to rename size_t to something else.
> I guess changing the typedef to `unsigned long long` will change behaviour of tests.
> Failing that an `// UNSUPPORTED: system-windows` directive at the top of the file would also work.
Thanks, njames93. I've switched to custom type names to avoid these sorts of conflicts. I've also removed the difference_type test, since it didn't test distinct functionality from size_type, once they use custom names.

Sorry for the inconvenience.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99543/new/

https://reviews.llvm.org/D99543



More information about the cfe-commits mailing list