[PATCH] D78704: [analyzer][NFC] Add unittest for FalsePositiveRefutationBRVisitor
Gabor Marton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 23 07:32:09 PDT 2020
martong added a comment.
I like it! Nice work! I have some minor comments.
================
Comment at: clang/unittests/StaticAnalyzer/CheckerRegistration.h:81
+template <AddCheckerFn... Fns>
+bool runCheckerOnCodeWithArgs(const std::string &Code, std::string &Diags,
+ const std::vector<std::string> &Args,
----------------
Do you use this function template anywhere?
================
Comment at: clang/unittests/StaticAnalyzer/FalsePositiveRefutationBRVisitorTest.cpp:138
+ std::string Diags2;
+ EXPECT_TRUE(runFalsePositiveGeneratorOnCode(Code, Diags2));
+ EXPECT_EQ(Diags2, "test.FalsePositiveGenerator:REACHED_WITH_CONTRADICTION\n");
----------------
There is no need to have `Diags2`. You could reuse `Diags` if in `runFalsePositiveGeneratorOnCode` you cleared the diag param.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78704/new/
https://reviews.llvm.org/D78704
More information about the cfe-commits
mailing list