clang  6.0.0svn
Public Member Functions | List of all members
clang::tooling::ReplaceIfStmtWithItsBody Class Reference

Replace an if-statement bound to Id with the outdented text of its body, choosing the consequent or the alternative based on whether PickTrueBranch is true. More...

#include "clang/Tooling/RefactoringCallbacks.h"

Inheritance diagram for clang::tooling::ReplaceIfStmtWithItsBody:
Inheritance graph
[legend]
Collaboration diagram for clang::tooling::ReplaceIfStmtWithItsBody:
Collaboration graph
[legend]

Public Member Functions

 ReplaceIfStmtWithItsBody (StringRef Id, bool PickTrueBranch)
 
void run (const ast_matchers::MatchFinder::MatchResult &Result) override
 Called on every match by the MatchFinder. More...
 
- Public Member Functions inherited from clang::tooling::RefactoringCallback
 RefactoringCallback ()
 
ReplacementsgetReplacements ()
 
- Public Member Functions inherited from clang::ast_matchers::MatchFinder::MatchCallback
virtual ~MatchCallback ()
 
virtual void onStartOfTranslationUnit ()
 Called at the start of each translation unit. More...
 
virtual void onEndOfTranslationUnit ()
 Called at the end of each translation unit. More...
 
virtual StringRef getID () const
 An id used to group the matchers. More...
 

Additional Inherited Members

- Protected Attributes inherited from clang::tooling::RefactoringCallback
Replacements Replace
 

Detailed Description

Replace an if-statement bound to Id with the outdented text of its body, choosing the consequent or the alternative based on whether PickTrueBranch is true.

Definition at line 127 of file RefactoringCallbacks.h.

Constructor & Destructor Documentation

◆ ReplaceIfStmtWithItsBody()

clang::tooling::ReplaceIfStmtWithItsBody::ReplaceIfStmtWithItsBody ( StringRef  Id,
bool  PickTrueBranch 
)

Definition at line 123 of file RefactoringCallbacks.cpp.

Member Function Documentation

◆ run()

void clang::tooling::ReplaceIfStmtWithItsBody::run ( const ast_matchers::MatchFinder::MatchResult Result)
overridevirtual

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