#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 {
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) { … }
}
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) { … }
}
}