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... | |
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.
clang::insights::ScopeHandler::ScopeHandler | ( | const Decl * | d | ) |
Definition at line 22 of file InsightsHelpers.cpp.
References clang::insights::GetName(), clang::insights::CodeGenerator::InsertTemplateArgs(), and StackList< T >::push().
clang::insights::ScopeHandler::~ScopeHandler | ( | ) |
Definition at line 49 of file InsightsHelpers.cpp.
References StackList< T >::pop().
|
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().