#include "TestingSupport.h"
#include "clang/Analysis/FlowSensitive/DataflowAnalysis.h"
#include "clang/Tooling/Tooling.h"
#include "llvm/Support/Error.h"
#include "llvm/Testing/Annotations/Annotations.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
#include <optional>
namespace clang::dataflow::test {
namespace {
usingnamespaceast_matchers;
struct TestLattice { … };
class TestPropagationAnalysis
: public DataflowAnalysis<TestPropagationAnalysis, TestLattice> { … };
UnorderedElementsAre;
template <typename Matcher>
void runDataflow(llvm::StringRef Code, Matcher VerifyResults,
LangStandard::Kind Std = LangStandard::lang_cxx17,
llvm::StringRef TargetFun = "fun") { … }
template <typename LatticeT>
const LatticeT &getLatticeAtAnnotation(
const llvm::StringMap<DataflowAnalysisState<LatticeT>> &AnnotationStates,
llvm::StringRef Annotation) { … }
TEST(TransferBranchTest, IfElse) { … }
}
}