[PATCH] D133244: [clang-tidy] Readability-container-data-pointer adds new option to ignore Containers
FĂ©lix-Antoine Constantin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 8 19:03:45 PDT 2022
felix642 added inline comments.
================
Comment at: clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp:1
-// RUN: %check_clang_tidy %s readability-container-data-pointer %t -- -- -fno-delayed-template-parsing
+// RUN: %check_clang_tidy %s readability-container-data-pointer %t -- -config="{CheckOptions: [{key: readability-container-data-pointer.IgnoredContainers, value: '::arrayType'}]}" -- -fno-delayed-template-parsing
----------------
Eugene.Zelenko wrote:
> felix642 wrote:
> > Eugene.Zelenko wrote:
> > > I think test should be separated to handle situations with and without option.
> > Hi @Eugene.Zelenko,
> >
> > I'm not familiar with clang-tidy's testing environment. What do you mean precisely by "test should be separated"? Does it mean I should define this test in a different .cpp with the appropriate tests?
> I meant that dedicated test for new check option should be created. But will be good idea to expand original one, so difference in behavior could be observed.
I have added a new check-clang-tidy with a config to ignore std::basic_string.
That way we can make sure that detections are still happening on containers that we do not ignore and we can also test that we don't detect containers that are defined in the config.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133244/new/
https://reviews.llvm.org/D133244
More information about the cfe-commits
mailing list