class PrintingCallbacks

Declaration

class PrintingCallbacks { /* full declaration omitted */ };

Description

Callbacks to use to customize the behavior of the pretty-printer.

Declared at: clang/include/clang/AST/PrettyPrinter.h:32

Method Overview

Methods

virtual bool isScopeVisible(
    const clang::DeclContext* DC) const

Description

When printing type to be inserted into code in specific context, this callback can be used to avoid printing the redundant part of the qualifier. For example, when inserting code inside namespace foo, we should print bar::SomeType instead of foo::bar::SomeType. To do this, shouldPrintScope should return true on "foo" NamespaceDecl. The printing stops at the first isScopeVisible() == true, so there will be no calls with outer scopes.

Declared at: clang/include/clang/AST/PrettyPrinter.h:49

Parameters

const clang::DeclContext* DC

virtual std::string remapPath(
    llvm::StringRef Path) const

Description

Remap a path to a form suitable for printing.

Declared at: clang/include/clang/AST/PrettyPrinter.h:38

Parameters

llvm::StringRef Path

~PrintingCallbacks()

Declared at: clang/include/clang/AST/PrettyPrinter.h:34