clang 8.0.0

Functions
RewriteObjC.cpp File Reference
`#include "clang/Rewrite/Frontend/ASTConsumers.h"`
`#include "clang/AST/AST.h"`
`#include "clang/AST/ASTConsumer.h"`
`#include "clang/AST/Attr.h"`
`#include "clang/AST/ParentMap.h"`
`#include "clang/Basic/CharInfo.h"`
`#include "clang/Basic/Diagnostic.h"`
`#include "clang/Basic/IdentifierTable.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Config/config.h"`
`#include "clang/Lex/Lexer.h"`
`#include "clang/Rewrite/Core/Rewriter.h"`
`#include "llvm/ADT/DenseSet.h"`
`#include "llvm/ADT/SmallPtrSet.h"`
`#include "llvm/ADT/StringExtras.h"`
`#include "llvm/Support/MemoryBuffer.h"`
`#include "llvm/Support/raw_ostream.h"`
`#include <memory>`
Include dependency graph for RewriteObjC.cpp:

Go to the source code of this file.

## Functions
static bool | IsHeaderFile (const std::string &Filename)
static std::string | getIvarAccessString (ObjCIvarDecl *OID)
static void | RewriteOneForwardClassDecl (ObjCInterfaceDecl *ForwardDecl, std::string &typedefString)
static bool | scanForProtocolRefs (const char *startBuf, const char *endBuf, const char *&startRef, const char *&endRef)
static void | scanToNextArgument (const char *&argRef)
static bool | HasLocalVariableExternalStorage (ValueDecl *VD)
static void | BuildUniqueMethodName (std::string &Name, ObjCMethodDecl *MD)

## Function Documentation

## ◆ BuildUniqueMethodName()

static void BuildUniqueMethodName | ( | std::string & | Name,
|  | ObjCMethodDecl * | MD
| ) |  |
| static

Definition at line 3625 of file RewriteObjC.cpp.

References clang::Stmt::children(), clang::Type::getAs(), clang::Selector::getAsString(), clang::ObjCMethodDecl::getBeginLoc(), clang::ObjCMethodDecl::getClassInterface(), clang::NamedDecl::getName(), clang::FunctionType::getReturnType(), clang::ObjCMethodDecl::getSelector(), HasLocalVariableExternalStorage(), and clang::FunctionProtoType::param_types().

## ◆ getIvarAccessString()

std::string RewriteModernObjC::getIvarAccessString | ( | ObjCIvarDecl * | OID | ) |
| static

Definition at line 757 of file RewriteObjC.cpp.

References clang::ObjCIvarDecl::getContainingInterface().

Referenced by mustSynthesizeSetterGetterMethod(), and WriteInternalIvarName().

## ◆ HasLocalVariableExternalStorage()

static bool HasLocalVariableExternalStorage | ( | ValueDecl * | VD | ) |
| static

Definition at line 3245 of file RewriteObjC.cpp.

References clang::QualType::getAsString(), clang::QualType::getAsStringInternal(), clang::BlockExpr::getBlockDecl(), clang::BlockExpr::getFunctionType(), clang::ASTContext::getPrintingPolicy(), clang::FunctionType::getReturnType(), clang::FunctionProtoType::isVariadic(), clang::BlockDecl::param_begin(), clang::BlockDecl::param_empty(), and clang::BlockDecl::param_end().

Referenced by BuildUniqueMethodName().

## ◆ IsHeaderFile()

static bool IsHeaderFile | ( | const std::string & | Filename | ) |
| static

Definition at line 564 of file RewriteObjC.cpp.

References clang::DiagnosticsEngine::getCustomDiagID(), clang::frontend::RewriteObjC, and clang::DiagnosticsEngine::Warning.

## ◆ RewriteOneForwardClassDecl()

static void RewriteOneForwardClassDecl | ( | ObjCInterfaceDecl * | ForwardDecl,
|  | std::string & | typedefString
| ) |  |
| static

Definition at line 889 of file RewriteObjC.cpp.

References clang::DeclGroupRef::begin(), clang::ObjCContainerDecl::class_methods(), clang::DeclGroupRef::end(), clang::Type::getAs(), clang::Selector::getAsString(), clang::QualType::getAsString(), clang::ObjCContainerDecl::getAtEndRange(), clang::ObjCPropertyDecl::getAtLoc(), clang::SourceRange::getBegin(), clang::ObjCMethodDecl::getBeginLoc(), clang::Decl::getBeginLoc(), clang::SourceManager::getCharacterData(), clang::Decl::getDeclContext(), clang::ObjCMethodDecl::getEndLoc(), clang::SourceManager::getExpansionLineNumber(), clang::SourceLocation::getLocWithOffset(), clang::NamedDecl::getNameAsString(), clang::ASTContext::getObjCClassType(), clang::ASTContext::getObjCInterfaceType(), clang::ASTContext::getObjCSelType(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPointerType(), clang::ASTContext::getPrintingPolicy(), clang::ObjCMethodDecl::getReturnType(), clang::FunctionType::getReturnType(), clang::ObjCMethodDecl::getSelector(), clang::ObjCContainerDecl::instance_methods(), clang::ObjCContainerDecl::instance_properties(), clang::Type::isBlockPointerType(), clang::Type::isFunctionPointerType(), clang::Decl::isImplicit(), clang::ObjCMethodDecl::isInstanceMethod(), clang::SourceLocation::isInvalid(), clang::Type::isObjCQualifiedIdType(), clang::ObjCProtocolDecl::isThisDeclarationADefinition(), and clang::ObjCMethodDecl::parameters().

## ◆ scanForProtocolRefs()

static bool scanForProtocolRefs | ( | const char * | startBuf,
|  | const char * | endBuf,
|  | const char *& | startRef,
|  | const char *& | endRef
| ) |  |
| static

Definition at line 2028 of file RewriteObjC.cpp.

Referenced by scanToNextArgument().

## ◆ scanToNextArgument()

static void scanToNextArgument | ( | const char *& | argRef | ) |
| static

Definition at line 2045 of file RewriteObjC.cpp.

References clang::Type::getAs(), clang::QualType::getAsString(), clang::ASTContext::getBaseElementType(), clang::Stmt::getBeginLoc(), clang::SourceManager::getCharacterData(), clang::Stmt::getEndLoc(), clang::VarDecl::getInit(), clang::Decl::getLocation(), clang::SourceLocation::getLocWithOffset(), clang::FunctionProtoType::getNumParams(), clang::FunctionProtoType::getParamType(), clang::Type::getPointeeType(), clang::PointerType::getPointeeType(), clang::ASTContext::getPrintingPolicy(), clang::FunctionType::getReturnType(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::DeclaratorDecl::getTypeSpecStartLoc(), clang::TypeOfExprType::getUnderlyingExpr(), clang::Type::isArrayType(), clang::SourceLocation::isInvalid(), clang::Type::isObjCObjectPointerType(), clang::Type::isObjCQualifiedIdType(), clang::Type::isObjCQualifiedInterfaceType(), and scanForProtocolRefs().