llvm/clang/lib/ARCMigrate/Transforms.cpp

//===--- Transforms.cpp - Transformations 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 "Transforms.h"
#include "Internals.h"
#include "clang/ARCMigrate/ARCMT.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Analysis/DomainSpecific/CocoaConventions.h"
#include "clang/Basic/SourceManager.h"
#include "clang/Basic/TargetInfo.h"
#include "clang/Lex/Lexer.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaObjC.h"

usingnamespaceclang;
usingnamespacearcmt;
usingnamespacetrans;

ASTTraverser::~ASTTraverser() {}

bool MigrationPass::CFBridgingFunctionsDefined() {}

//===----------------------------------------------------------------------===//
// Helpers.
//===----------------------------------------------------------------------===//

bool trans::canApplyWeak(ASTContext &Ctx, QualType type,
                         bool AllowOnUnknownClass) {}

bool trans::isPlusOneAssign(const BinaryOperator *E) {}

bool trans::isPlusOne(const Expr *E) {}

/// 'Loc' is the end of a statement range. This returns the location
/// immediately after the semicolon following the statement.
/// If no semicolon is found or the location is inside a macro, the returned
/// source location will be invalid.
SourceLocation trans::findLocationAfterSemi(SourceLocation loc,
                                            ASTContext &Ctx, bool IsDecl) {}

/// \arg Loc is the end of a statement range. This returns the location
/// of the semicolon following the statement.
/// If no semicolon is found or the location is inside a macro, the returned
/// source location will be invalid.
SourceLocation trans::findSemiAfterLocation(SourceLocation loc,
                                            ASTContext &Ctx,
                                            bool IsDecl) {}

bool trans::hasSideEffects(Expr *E, ASTContext &Ctx) {}

bool trans::isGlobalVar(Expr *E) {}

StringRef trans::getNilString(MigrationPass &Pass) {}

namespace {

class ReferenceClear : public RecursiveASTVisitor<ReferenceClear> {};

class ReferenceCollector : public RecursiveASTVisitor<ReferenceCollector> {};

class RemovablesCollector : public RecursiveASTVisitor<RemovablesCollector> {};

} // end anonymous namespace

void trans::clearRefsIn(Stmt *S, ExprSet &refs) {}

void trans::collectRefs(ValueDecl *D, Stmt *S, ExprSet &refs) {}

void trans::collectRemovables(Stmt *S, ExprSet &exprs) {}

//===----------------------------------------------------------------------===//
// MigrationContext
//===----------------------------------------------------------------------===//

namespace {

class ASTTransform : public RecursiveASTVisitor<ASTTransform> {};

}

MigrationContext::~MigrationContext() {}

bool MigrationContext::isGCOwnedNonObjC(QualType T) {}

bool MigrationContext::rewritePropertyAttribute(StringRef fromAttr,
                                                StringRef toAttr,
                                                SourceLocation atLoc) {}

bool MigrationContext::addPropertyAttribute(StringRef attr,
                                            SourceLocation atLoc) {}

void MigrationContext::traverse(TranslationUnitDecl *TU) {}

static void GCRewriteFinalize(MigrationPass &pass) {}

//===----------------------------------------------------------------------===//
// getAllTransformations.
//===----------------------------------------------------------------------===//

static void traverseAST(MigrationPass &pass) {}

static void independentTransforms(MigrationPass &pass) {}

std::vector<TransformFn> arcmt::getAllTransformations(
                                               LangOptions::GCMode OrigGCMode,
                                               bool NoFinalizeRemoval) {}