clang  14.0.0git
Public Member Functions | Protected Member Functions | List of all members
clang::PrintingCallbacks Class Reference

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

#include "clang/AST/PrettyPrinter.h"

Public Member Functions

virtual std::string remapPath (StringRef Path) const
 Remap a path to a form suitable for printing. More...
 
virtual bool isScopeVisible (const DeclContext *DC) const
 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. More...
 

Protected Member Functions

 ~PrintingCallbacks ()=default
 

Detailed Description

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

Definition at line 34 of file PrettyPrinter.h.

Constructor & Destructor Documentation

◆ ~PrintingCallbacks()

clang::PrintingCallbacks::~PrintingCallbacks ( )
protecteddefault

Member Function Documentation

◆ isScopeVisible()

virtual bool clang::PrintingCallbacks::isScopeVisible ( const DeclContext DC) const
inlinevirtual

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.

Definition at line 51 of file PrettyPrinter.h.

◆ remapPath()

virtual std::string clang::PrintingCallbacks::remapPath ( StringRef  Path) const
inlinevirtual

Remap a path to a form suitable for printing.

Definition at line 40 of file PrettyPrinter.h.

References string().


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