llvm/clang/lib/ARCMigrate/TransformActions.cpp

//===-- TransformActions.cpp - Migration to ARC mode ----------------------===//
//
// 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 "Internals.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Expr.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Lex/Preprocessor.h"
#include "llvm/ADT/DenseSet.h"
#include <map>
usingnamespaceclang;
usingnamespacearcmt;

namespace {

/// Collects transformations and merges them before applying them with
/// with applyRewrites(). E.g. if the same source range
/// is requested to be removed twice, only one rewriter remove will be invoked.
/// Rewrites happen in "transactions"; if one rewrite in the transaction cannot
/// be done (e.g. it resides in a macro) all rewrites in the transaction are
/// aborted.
/// FIXME: "Transactional" rewrites support should be baked in the Rewriter.
class TransformActionsImpl {};

} // anonymous namespace

void TransformActionsImpl::startTransaction() {}

bool TransformActionsImpl::commitTransaction() {}

void TransformActionsImpl::abortTransaction() {}

void TransformActionsImpl::insert(SourceLocation loc, StringRef text) {}

void TransformActionsImpl::insertAfterToken(SourceLocation loc, StringRef text) {}

void TransformActionsImpl::remove(SourceRange range) {}

void TransformActionsImpl::removeStmt(Stmt *S) {}

void TransformActionsImpl::replace(SourceRange range, StringRef text) {}

void TransformActionsImpl::replace(SourceRange range,
                                   SourceRange replacementRange) {}

void TransformActionsImpl::replaceText(SourceLocation loc, StringRef text,
                                       StringRef replacementText) {}

void TransformActionsImpl::replaceStmt(Stmt *S, StringRef text) {}

void TransformActionsImpl::increaseIndentation(SourceRange range,
                                               SourceLocation parentIndent) {}

bool TransformActionsImpl::clearDiagnostic(ArrayRef<unsigned> IDs,
                                           SourceRange range) {}

bool TransformActionsImpl::canInsert(SourceLocation loc) {}

bool TransformActionsImpl::canInsertAfterToken(SourceLocation loc) {}

bool TransformActionsImpl::canRemoveRange(SourceRange range) {}

bool TransformActionsImpl::canReplaceRange(SourceRange range,
                                           SourceRange replacementRange) {}

bool TransformActionsImpl::canReplaceText(SourceLocation loc, StringRef text) {}

void TransformActionsImpl::commitInsert(SourceLocation loc, StringRef text) {}

void TransformActionsImpl::commitInsertAfterToken(SourceLocation loc,
                                                  StringRef text) {}

void TransformActionsImpl::commitRemove(SourceRange range) {}

void TransformActionsImpl::commitRemoveStmt(Stmt *S) {}

void TransformActionsImpl::commitReplace(SourceRange range,
                                         SourceRange replacementRange) {}
void TransformActionsImpl::commitReplaceText(SourceLocation loc,
                                             StringRef text,
                                             StringRef replacementText) {}

void TransformActionsImpl::commitIncreaseIndentation(SourceRange range,
                                                  SourceLocation parentIndent) {}

void TransformActionsImpl::commitClearDiagnostic(ArrayRef<unsigned> IDs,
                                                 SourceRange range) {}

void TransformActionsImpl::addInsertion(SourceLocation loc, StringRef text) {}

void TransformActionsImpl::addRemoval(CharSourceRange range) {}

void TransformActionsImpl::applyRewrites(
                                  TransformActions::RewriteReceiver &receiver) {}

/// Stores text passed to the transformation methods to keep the string
/// "alive". Since the vast majority of text will be the same, we also unique
/// the strings using a StringMap.
StringRef TransformActionsImpl::getUniqueText(StringRef text) {}

/// Computes the source location just past the end of the token at
/// the given source location. If the location points at a macro, the whole
/// macro expansion is skipped.
SourceLocation TransformActionsImpl::getLocForEndOfToken(SourceLocation loc,
                                                         SourceManager &SM,
                                                         Preprocessor &PP) {}

TransformActions::RewriteReceiver::~RewriteReceiver() {}

TransformActions::TransformActions(DiagnosticsEngine &diag,
                                   CapturedDiagList &capturedDiags,
                                   ASTContext &ctx, Preprocessor &PP)
    :{}

TransformActions::~TransformActions() {}

void TransformActions::startTransaction() {}

bool TransformActions::commitTransaction() {}

void TransformActions::abortTransaction() {}


void TransformActions::insert(SourceLocation loc, StringRef text) {}

void TransformActions::insertAfterToken(SourceLocation loc,
                                        StringRef text) {}

void TransformActions::remove(SourceRange range) {}

void TransformActions::removeStmt(Stmt *S) {}

void TransformActions::replace(SourceRange range, StringRef text) {}

void TransformActions::replace(SourceRange range,
                               SourceRange replacementRange) {}

void TransformActions::replaceStmt(Stmt *S, StringRef text) {}

void TransformActions::replaceText(SourceLocation loc, StringRef text,
                                   StringRef replacementText) {}

void TransformActions::increaseIndentation(SourceRange range,
                                           SourceLocation parentIndent) {}

bool TransformActions::clearDiagnostic(ArrayRef<unsigned> IDs,
                                       SourceRange range) {}

void TransformActions::applyRewrites(RewriteReceiver &receiver) {}

DiagnosticBuilder TransformActions::report(SourceLocation loc, unsigned diagId,
                                           SourceRange range) {}

void TransformActions::reportError(StringRef message, SourceLocation loc,
                                   SourceRange range) {}

void TransformActions::reportWarning(StringRef message, SourceLocation loc,
                                     SourceRange range) {}

void TransformActions::reportNote(StringRef message, SourceLocation loc,
                                  SourceRange range) {}