Classes | Namespaces | Macros | Functions
InsightsHelpers.h File Reference
#include "clang/AST/AST.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/RecursiveASTVisitor.h"
#include "clang/Lex/Lexer.h"
#include <functional>
#include <optional>
#include <string>
#include <variant>
#include "InsightsStrongTypes.h"
#include "StackList.h"
Include dependency graph for InsightsHelpers.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  clang::insights::ScopeHelper
 Track the scope we are currently in to build a properly scoped variable. More...
 
class  clang::insights::ScopeHandler
 The ScopeHandler tracks the current scope. More...
 
class  clang::insights::StringStream
 Specialization for ::llvm::raw_string_ostream with an internal std::string buffer. More...
 
class  clang::insights::FinalAction< T >
 A helper which invokes a lambda when the scope is destroyed. More...
 
struct  clang::insights::is< T >
 Handy helper to avoid longish comparisons. More...
 
class  clang::insights::P0315Visitor
 ! Find a LambdaExpr inside a Decltype More...
 
struct  clang::insights::BackupAndRestore< T, U >
 
class  clang::insights::MyOptional< T >
 

Namespaces

 clang
 
 clang::insights
 

Macros

#define SCOPE_HELPER(d)
 Helper to create a ScopeHandler on the stack which adds the current Decl to it and removes it once the scope is left. More...
 

Functions

std::string clang::insights::BuildTemplateParamObjectName (std::string name)
 
std::string clang::insights::BuildInternalVarName (const std::string_view &varName)
 
std::string clang::insights::MakeLineColumnName (const SourceManager &sm, const SourceLocation &loc, const std::string_view &prefix)
 
bool clang::insights::IsStaticStorageClass (const CXXMethodDecl *md)
 
bool clang::insights::IsReferenceType (const ValueDecl *decl)
 
bool clang::insights::IsReferenceType (const DeclRefExpr *decl)
 
std::string clang::insights::BuildRetTypeName (const Decl &decl)
 
bool clang::insights::Contains (const std::string_view source, const std::string_view search)
 
template<typename K , typename V , typename U >
bool clang::insights::Contains (const llvm::DenseMap< K, V > &map, const U &key)
 
void clang::insights::ReplaceAll (std::string &str, std::string_view from, std::string_view to)
 
void clang::insights::InsertBefore (std::string &source, const std::string_view &find, const std::string_view &replace)
 
const SourceManager & clang::insights::GetSM (const Decl &decl)
 
const LangOptions & clang::insights::GetLangOpts (const Decl &decl)
 
APValue * clang::insights::GetEvaluatedValue (const VarDecl &varDecl)
 Get the evaluated APValue from a VarDecl More...
 
bool clang::insights::IsEvaluatable (const VarDecl &varDecl)
 Check whether a VarDecls initialization can be done a compile-time. More...
 
bool clang::insights::IsTrivialStaticClassVarDecl (const VarDecl &varDecl)
 
std::string clang::insights::GetPlainName (const DeclRefExpr &DRE)
 
std::string clang::insights::GetName (const DeclRefExpr &declRefExpr)
 
std::string clang::insights::GetName (const VarDecl &VD)
 
std::string clang::insights::GetName (const TemplateParamObjectDecl &decl)
 
 clang::insights::STRONG_BOOL (QualifiedName)
 
std::string clang::insights::GetName (const NamedDecl &nd, const QualifiedName qualifiedName)
 
std::string clang::insights::GetNameAsFunctionPointer (const QualType &t)
 
std::string clang::insights::GetLambdaName (const CXXRecordDecl &lambda)
 
std::string clang::insights::GetLambdaName (const LambdaExpr &lambda)
 
std::string clang::insights::GetName (const CXXRecordDecl &RD)
 
std::string clang::insights::GetName (const CXXTemporaryObjectExpr &tmp)
 
std::string clang::insights::GetTemporaryName (const Expr &tmp)
 
QualType clang::insights::GetType (QualType)
 In Cfront mode we transform references to pointers. More...
 
bool clang::insights::IsAnonymousStructOrUnion (const CXXRecordDecl *cxxRecordDecl)
 Check whether this is an anonymous struct or union. More...
 
void clang::insights::AppendTemplateTypeParamName (OutputFormatHelper &ofm, const TemplateTypeParmDecl *decl, const bool isParameter, const TemplateTypeParmType *type)
 
const QualType clang::insights::GetDesugarType (const QualType &QT)
 Remove decltype from a QualType, if possible. More...
 
QualType clang::insights::GetDesugarReturnType (const FunctionDecl &FD)
 
 clang::insights::STRONG_BOOL (Unqualified)
 
std::string clang::insights::GetName (const QualType &t, const Unqualified unqualified)
 
std::string clang::insights::GetUnqualifiedScopelessName (const Type *type)
 
std::string clang::insights::GetTypeNameAsParameter (const QualType &t, std::string_view varName, const Unqualified unqualified)
 
 clang::insights::STRONG_BOOL (WithTemplateParameters)
 
 clang::insights::STRONG_BOOL (IgnoreNamespace)
 
std::string clang::insights::GetNestedName (const NestedNameSpecifier *nns, const IgnoreNamespace ignoreNamespace)
 
std::string clang::insights::GetDeclContext (const DeclContext *ctx, WithTemplateParameters withTemplateParameters)
 
const std::string clang::insights::GetNoExcept (const FunctionDecl &decl)
 
const std::string_view clang::insights::GetConst (const FunctionDecl &decl)
 
std::string clang::insights::GetElaboratedTypeKeyword (const ElaboratedTypeKeyword keyword)
 
uint64_t clang::insights::GetSize (const ConstantArrayType *arrayType)
 
template<typename QT , typename SUB_T >
static bool clang::insights::TypeContainsSubType (const QualType &t)
 
template<typename T , typename TFunc >
void clang::insights::for_each (T start, T end, TFunc &&func)
 
template<typename T >
 clang::insights::is (T) -> is< T >
 
const DeclRefExpr * clang::insights::FindDeclRef (const Stmt *stmt)
 Go deep in a Stmt if necessary and look to all childs for a DeclRefExpr. More...
 

Macro Definition Documentation

◆ SCOPE_HELPER

#define SCOPE_HELPER (   d)
Value:
ScopeHandler _scopeHandler \
{ \
d \
}

Helper to create a ScopeHandler on the stack which adds the current Decl to it and removes it once the scope is left.

Definition at line 289 of file InsightsHelpers.h.