[clang][dataflow] Remove TestingSupport's dependency on gtest
authorYitzhak Mandelbaum <yitzhakm@google.com>
Fri, 14 Jan 2022 12:57:07 +0000 (12:57 +0000)
committerYitzhak Mandelbaum <yitzhakm@google.com>
Mon, 17 Jan 2022 15:33:23 +0000 (15:33 +0000)
commit875117ae7a21f0282e09a72addaf41dfd033cc55
tree4841c4f70f800e5aa3c2ac644133e118ffa620d8
parent9fe67486cc06a02308a169a33ecbbf841017a27d
[clang][dataflow] Remove TestingSupport's dependency on gtest

Users outside of the clang repo may use different googletest versions. So, it's
better not to depend on llvm's googletest. This patch removes the dependency by
having `checkDataflow` return an `llvm::Error` instead of calling googletest's
`FAIL` or `ASSERT...` macros.

Differential Revision: https://reviews.llvm.org/D117304
clang/unittests/Analysis/FlowSensitive/MultiVarConstantPropagationTest.cpp
clang/unittests/Analysis/FlowSensitive/SingleVarConstantPropagationTest.cpp
clang/unittests/Analysis/FlowSensitive/TestingSupport.cpp
clang/unittests/Analysis/FlowSensitive/TestingSupport.h
clang/unittests/Analysis/FlowSensitive/TestingSupportTest.cpp
clang/unittests/Analysis/FlowSensitive/TransferTest.cpp
clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp