class ReplaceIfStmtWithItsBody

Declaration

class ReplaceIfStmtWithItsBody : public RefactoringCallback { /* full declaration omitted */ };

Description

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

Declared at: clang/include/clang/Tooling/RefactoringCallbacks.h:126

Inherits from: RefactoringCallback

Member Variables

private std::string Id
private const bool PickTrueBranch

Inherited from RefactoringCallback:

protected Replace

Method Overview

  • public ReplaceIfStmtWithItsBody(llvm::StringRef Id, bool PickTrueBranch)
  • public void run(const ast_matchers::MatchFinder::MatchResult & Result)

Inherited from RefactoringCallback:

Inherited from MatchFinder::MatchCallback:

Methods

ReplaceIfStmtWithItsBody(llvm::StringRef Id,
                         bool PickTrueBranch)

Declared at: clang/include/clang/Tooling/RefactoringCallbacks.h:128

Parameters

llvm::StringRef Id
bool PickTrueBranch

void run(
    const ast_matchers::MatchFinder::MatchResult&
        Result)

Description

Called on every match by the \c MatchFinder.

Declared at: clang/include/clang/Tooling/RefactoringCallbacks.h:129

Parameters

const ast_matchers::MatchFinder::MatchResult& Result