llvm/clang-tools-extra/clangd/refactor/InsertionPoint.cpp

//===--- InsertionPoint.cpp - Where should we add new code? ---------------===//
//
// 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 "refactor/InsertionPoint.h"
#include "support/Logger.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/Basic/SourceManager.h"
#include <optional>

namespace clang {
namespace clangd {
namespace {

// Choose the decl to insert before, according to an anchor.
// Nullptr means insert at end of DC.
// std::nullopt means no valid place to insert.
std::optional<const Decl *> insertionDecl(const DeclContext &DC,
                                          const Anchor &A) {}

SourceLocation beginLoc(const Decl &D) {}

bool any(const Decl *D) {}

SourceLocation endLoc(const DeclContext &DC) {}

AccessSpecifier getAccessAtEnd(const CXXRecordDecl &C) {}

} // namespace

SourceLocation insertionPoint(const DeclContext &DC,
                              llvm::ArrayRef<Anchor> Anchors) {}

llvm::Expected<tooling::Replacement>
insertDecl(llvm::StringRef Code, const DeclContext &DC,
           llvm::ArrayRef<Anchor> Anchors) {}

SourceLocation insertionPoint(const CXXRecordDecl &InClass,
                              std::vector<Anchor> Anchors,
                              AccessSpecifier Protection) {}

llvm::Expected<tooling::Replacement> insertDecl(llvm::StringRef Code,
                                                const CXXRecordDecl &InClass,
                                                std::vector<Anchor> Anchors,
                                                AccessSpecifier Protection) {}

} // namespace clangd
} // namespace clang