clang-tools 8.0.0

Public Member Functions | List of all members
clang::move::ClangMoveTool Class Reference

`#include <ClangMove.h>`

Inheritance diagram for clang::move::ClangMoveTool:
[legend]
Collaboration diagram for clang::move::ClangMoveTool:
[legend]

## Public Member Functions
| ClangMoveTool (ClangMoveContext *const Context, DeclarationReporter *const Reporter)
void | registerMatchers (ast_matchers::MatchFinder *Finder)
void | run (const ast_matchers::MatchFinder::MatchResult &Result) override
void | onEndOfTranslationUnit () override
void | addIncludes (llvm::StringRef IncludeHeader, bool IsAngled, llvm::StringRef SearchPath, llvm::StringRef FileName, clang::CharSourceRange IncludeFilenameRange, const SourceManager &SM)
| Add #includes from old.h/cc files. More...
std::vector< const NamedDecl * > & | getMovedDecls ()
void | addRemovedDecl (const NamedDecl *Decl)
| Add declarations being removed from old.h/cc. More...
llvm::SmallPtrSet< const NamedDecl *, 8 > & | getUnremovedDeclsInOldHeader ()

## Detailed Description

Definition at line 117 of file ClangMove.h.

## Constructor & Destructor Documentation

## ◆ ClangMoveTool()

clang::move::ClangMoveTool::ClangMoveTool | ( | ClangMoveContext *const | Context,
|  | DeclarationReporter *const | Reporter
| ) |  |

Definition at line 486 of file ClangMove.cpp.

## Member Function Documentation

## ◆ addIncludes()

void clang::move::ClangMoveTool::addIncludes | ( | llvm::StringRef | IncludeHeader,
|  | bool | IsAngled,
|  | llvm::StringRef | SearchPath,
|  | llvm::StringRef | FileName,
|  | clang::CharSourceRange | IncludeFilenameRange,
|  | const SourceManager & | SM
| ) |  |

Add #includes from old.h/cc files.

Parameters

  IncludeHeader | The name of the file being included, as written in the source code.
  IsAngled | Whether the file name was enclosed in angle brackets.
  SearchPath | The search path which was used to find the IncludeHeader in the file system. It can be a relative path or an absolute path.
  FileName | The name of file where the IncludeHeader comes from.
  IncludeFilenameRange | The source range for the written file name in #include (i.e. "old.h" for #include "old.h") in old.cc.
  SM | The SourceManager.

Definition at line 689 of file ClangMove.cpp.

## ◆ addRemovedDecl()

void clang::move::ClangMoveTool::addRemovedDecl | ( | const NamedDecl * | Decl | ) |

Add declarations being removed from old.h/cc.

For each declarations, the method also records the mapping relationship between the corresponding FilePath and its FileID.

Definition at line 493 of file ClangMove.cpp.

## ◆ getMovedDecls()

std::vector<const NamedDecl *>& clang::move::ClangMoveTool::getMovedDecls | ( |  | ) |
| inline

Definition at line 144 of file ClangMove.h.

## ◆ getUnremovedDeclsInOldHeader()

llvm::SmallPtrSet<const NamedDecl *, 8>& clang::move::ClangMoveTool::getUnremovedDeclsInOldHeader | ( |  | ) |
| inline

Definition at line 151 of file ClangMove.h.

References Path.

## ◆ onEndOfTranslationUnit()

void clang::move::ClangMoveTool::onEndOfTranslationUnit | ( |  | ) |
| override

Definition at line 879 of file ClangMove.cpp.

References clang::move::HelperDeclRefGraph::dump(), clang::move::ClangMoveContext::DumpDeclarations, clang::move::HelperDeclRGBuilder::getGraph(), Kind, clang::move::MoveDefinitionSpec::NewCC, clang::move::MoveDefinitionSpec::NewHeader, clang::move::MoveDefinitionSpec::OldCC, clang::move::MoveDefinitionSpec::OldHeader, clang::move::DeclarationReporter::reportDeclaration(), and clang::move::ClangMoveContext::Spec.

## ◆ registerMatchers()

void clang::move::ClangMoveTool::registerMatchers | ( | ast_matchers::MatchFinder * | Finder | ) |

Definition at line 501 of file ClangMove.cpp.

## ◆ run()

void clang::move::ClangMoveTool::run | ( | const ast_matchers::MatchFinder::MatchResult & | Result | ) |
| override

Definition at line 662 of file ClangMove.cpp.

References D, clang::move::ClangMoveContext::OriginalRunningDirectory, and Path.

The documentation for this class was generated from the following files:

- ClangMove.h
- ClangMove.cpp