#include "clang/Analysis/Analyses/IntervalPartition.h"
#include "CFGBuildResult.h"
#include "clang/Analysis/CFG.h"
#include "llvm/Support/raw_ostream.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <type_traits>
#include <variant>
namespace clang {
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
const std::vector<const CFGBlock *> &Nodes) { … }
void PrintTo(const std::vector<const CFGBlock *> &Nodes, std::ostream *OS) { … }
namespace internal {
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const CFGIntervalNode &I) { … }
llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
const CFGIntervalGraph &G) { … }
void PrintTo(const CFGIntervalNode &I, std::ostream *OS) { … }
void PrintTo(const CFGIntervalGraph &G, std::ostream *OS) { … }
}
namespace {
BuildCFG;
BuildResult;
buildInterval;
partitionIntoIntervals;
ElementsAre;
IsEmpty;
Optional;
Property;
UnorderedElementsAre;
MATCHER_P(intervalID, ID, "") { … }
template <typename... T> auto blockIDs(T... IDs) { … }
template <typename... T> auto blockOrder(T... IDs) { … }
MATCHER_P3(isInterval, ID, Preds, Succs, "") { … }
MATCHER_P4(isInterval, ID, Nodes, Preds, Succs, "") { … }
TEST(BuildInterval, PartitionSimpleOneInterval) { … }
TEST(BuildInterval, PartitionIfThenOneInterval) { … }
TEST(BuildInterval, PartitionWhileMultipleIntervals) { … }
TEST(PartitionIntoIntervals, PartitionIfThenOneInterval) { … }
TEST(PartitionIntoIntervals, PartitionWhileTwoIntervals) { … }
TEST(PartitionIntoIntervals, PartitionNestedWhileThreeIntervals) { … }
TEST(PartitionIntoIntervals, PartitionSequentialWhileThreeIntervals) { … }
TEST(PartitionIntoIntervals, LimitReducibleSequentialWhile) { … }
TEST(PartitionIntoIntervals, LimitReducibleNestedWhile) { … }
TEST(GetIntervalWTO, SequentialWhile) { … }
TEST(GetIntervalWTO, NestedWhile) { … }
TEST(GetIntervalWTO, UnreachablePred) { … }
TEST(WTOCompare, UnreachableBlock) { … }
}
}