llvm/clang-tools-extra/include-cleaner/unittests/AnalysisTest.cpp

//===--- AnalysisTest.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "clang-include-cleaner/Analysis.h"
#include "AnalysisInternal.h"
#include "TypesInternal.h"
#include "clang-include-cleaner/Record.h"
#include "clang-include-cleaner/Types.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclBase.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/IdentifierTable.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Format/Format.h"
#include "clang/Frontend/FrontendActions.h"
#include "clang/Testing/TestAST.h"
#include "clang/Tooling/Inclusions/StandardLibrary.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/IntrusiveRefCntPtr.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/ScopedPrinter.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Testing/Annotations/Annotations.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <cstddef>
#include <map>
#include <memory>
#include <string>
#include <vector>

namespace clang::include_cleaner {
namespace {
_;
AllOf;
Contains;
ElementsAre;
Pair;
UnorderedElementsAre;

std::string guard(llvm::StringRef Code) {}

class WalkUsedTest : public testing::Test {};

TEST_F(WalkUsedTest, Basic) {}

TEST_F(WalkUsedTest, MultipleProviders) {}

TEST_F(WalkUsedTest, MacroRefs) {}

class AnalyzeTest : public testing::Test {};

TEST_F(AnalyzeTest, Basic) {}

TEST_F(AnalyzeTest, PrivateUsedInPublic) {}

TEST_F(AnalyzeTest, NoCrashWhenUnresolved) {}

TEST_F(AnalyzeTest, ResourceDirIsIgnored) {}

TEST_F(AnalyzeTest, DifferentHeaderSameSpelling) {}

TEST_F(AnalyzeTest, SpellingIncludesWithSymlinks) {}

TEST(FixIncludes, Basic) {}

MATCHER_P3(expandedAt, FileID, Offset, SM, "") {}
MATCHER_P3(spelledAt, FileID, Offset, SM, "") {}
TEST(WalkUsed, FilterRefsNotSpelledInMainFile) {}

struct Tag {};
TEST(Hints, Ordering) {}

// Test ast traversal & redecl selection end-to-end for templates, as explicit
// instantiations/specializations are not redecls of the primary template. We
// need to make sure we're selecting the right ones.
TEST_F(WalkUsedTest, TemplateDecls) {}

TEST_F(WalkUsedTest, IgnoresIdentityMacros) {}
} // namespace
} // namespace clang::include_cleaner