Public Member Functions | Static Public Member Functions | List of all members
clang::insights::ScopeHandler Class Reference

The ScopeHandler tracks the current scope. More...

#include "InsightsHelpers.h"

Public Member Functions

 ScopeHandler (const Decl *d)
 
 ~ScopeHandler ()
 

Static Public Member Functions

static std::string RemoveCurrentScope (std::string name)
 Remove the current scope from a string. More...
 

Detailed Description

The ScopeHandler tracks the current scope.

The ScopeHandler tracks the current scope, knows about all the parts and is able to remove the current scope part from a name.

Definition at line 262 of file InsightsHelpers.h.

Constructor & Destructor Documentation

◆ ScopeHandler()

clang::insights::ScopeHandler::ScopeHandler ( const Decl *  d)

◆ ~ScopeHandler()

clang::insights::ScopeHandler::~ScopeHandler ( )

Definition at line 49 of file InsightsHelpers.cpp.

References StackList< T >::pop().

Member Function Documentation

◆ RemoveCurrentScope()

std::string clang::insights::ScopeHandler::RemoveCurrentScope ( std::string  name)
static

Remove the current scope from a string.

The default is that the entire scope is replaced. Suppose we are currently in N::X and having a symbol N::X::y then N::X:: is removed. However, there is a special case, where the last item is skipped.

Definition at line 56 of file InsightsHelpers.cpp.

References StackList< T >::back().

Referenced by clang::insights::GetName(), clang::insights::details::GetName(), clang::insights::GetPlainName(), clang::insights::details::GetQualifiedName(), clang::insights::CodeGenerator::InsertNamespace(), and clang::insights::CodeGenerator::InsertQualifierAndName().


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