llvm/clang-tools-extra/clangd/unittests/XRefsTests.cpp

//===-- XRefsTests.cpp  ---------------------------*- C++ -*--------------===//
//
// 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 "Annotations.h"
#include "AST.h"
#include "ParsedAST.h"
#include "Protocol.h"
#include "SourceCode.h"
#include "SyncAPI.h"
#include "TestFS.h"
#include "TestTU.h"
#include "XRefs.h"
#include "index/MemIndex.h"
#include "clang/AST/Decl.h"
#include "clang/Basic/SourceLocation.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/ScopedPrinter.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <optional>
#include <string>
#include <vector>

namespace clang {
namespace clangd {
namespace {

AllOf;
ElementsAre;
Eq;
IsEmpty;
Matcher;
UnorderedElementsAre;
UnorderedElementsAreArray;
UnorderedPointwise;

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

MATCHER_P2(FileRange, File, Range, "") {}
MATCHER(declRange, "") {}

// Extracts ranges from an annotated example, and constructs a matcher for a
// highlight set. Ranges should be named $read/$write as appropriate.
Matcher<const std::vector<DocumentHighlight> &>
highlightsFrom(const Annotations &Test) {}

TEST(HighlightsTest, All) {}

TEST(HighlightsTest, ControlFlow) {}

MATCHER_P3(sym, Name, Decl, DefOrNone, "") {}

MATCHER_P(sym, Name, "") {}

MATCHER_P(rangeIs, R, "") {}
MATCHER_P(containerIs, C, "") {}
MATCHER_P(attrsAre, A, "") {}
MATCHER_P(hasID, ID, "") {}

TEST(LocateSymbol, WithIndex) {}

TEST(LocateSymbol, AnonymousStructFields) {}

TEST(LocateSymbol, FindOverrides) {}

TEST(LocateSymbol, WithIndexPreferredLocation) {}

TEST(LocateSymbol, All) {}
TEST(LocateSymbol, ValidSymbolID) {}

TEST(LocateSymbol, AllMulti) {}

// LocateSymbol test cases that produce warnings.
// These are separated out from All so that in All we can assert
// that there are no diagnostics.
TEST(LocateSymbol, Warnings) {}

TEST(LocateSymbol, TextualSmoke) {}

TEST(LocateSymbol, Textual) {} // namespace

TEST(LocateSymbol, Ambiguous) {}

TEST(LocateSymbol, TextualDependent) {}

TEST(LocateSymbol, Alias) {}

TEST(LocateSymbol, RelPathsInCompileCommand) {}

TEST(GoToInclude, All) {}

TEST(LocateSymbol, WithPreamble) {}

TEST(LocateSymbol, NearbyTokenSmoke) {}

TEST(LocateSymbol, NearbyIdentifier) {}

TEST(FindImplementations, Inheritance) {}

TEST(FindImplementations, CaptureDefinition) {}

TEST(FindType, All) {}

TEST(FindType, Definition) {}

TEST(FindType, Index) {}

void checkFindRefs(llvm::StringRef Test, bool UseIndex = false) {}

TEST(FindReferences, WithinAST) {}

TEST(FindReferences, ConceptsWithinAST) {}

TEST(FindReferences, ConceptReq) {}

TEST(FindReferences, RequiresExprParameters) {}

TEST(FindReferences, IncludeOverrides) {}

TEST(FindReferences, RefsToBaseMethod) {}

TEST(FindReferences, MainFileReferencesOnly) {}

TEST(FindReferences, ExplicitSymbols) {}

TEST(FindReferences, UsedSymbolsFromInclude) {}

TEST(FindReferences, NeedsIndexForSymbols) {}

TEST(FindReferences, NeedsIndexForMacro) {}

TEST(FindReferences, NoQueryForLocalSymbols) {}

TEST(GetNonLocalDeclRefs, All) {}

TEST(DocumentLinks, All) {}

} // namespace
} // namespace clangd
} // namespace clang