Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TClingUtils.cxx File Reference
#include <algorithm>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <stdio.h>
#include <unordered_set>
#include "RConfigure.h"
#include <ROOT/RConfig.hxx>
#include <ROOT/FoundationUtils.hxx>
#include "Rtypes.h"
#include "strlcpy.h"
#include "RStl.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/CXXInheritance.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/Mangle.h"
#include "clang/AST/Type.h"
#include "clang/AST/TypeVisitor.h"
#include "clang/Frontend/CompilerInstance.h"
#include "clang/Lex/HeaderSearch.h"
#include "clang/Lex/ModuleMap.h"
#include "clang/Lex/Preprocessor.h"
#include "clang/Lex/PreprocessorOptions.h"
#include "clang/Sema/Lookup.h"
#include "clang/Sema/Sema.h"
#include "clang/Sema/SemaDiagnostic.h"
#include "cling/Interpreter/LookupHelper.h"
#include "cling/Interpreter/Transaction.h"
#include "cling/Interpreter/Interpreter.h"
#include "cling/Utils/AST.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/FileSystem.h"
#include "../../../interpreter/llvm/src/tools/clang/lib/Sema/HackForDefaultTemplateArg.h"
#include "TClingUtils.h"
#include <unistd.h>
Include dependency graph for TClingUtils.cxx:

Classes

class  ROOT::TMetaUtils::TNormalizedCtxtImpl
 

Namespaces

namespace  ROOT
 This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
 
namespace  ROOT::TMetaUtils
 

Typedefs

using TNCtxtFullQual = ROOT::TMetaUtils::TNormalizedCtxtImpl
 

Functions

static bool areEqualTypes (const clang::TemplateArgument &tArg, llvm::SmallVectorImpl< clang::TemplateArgument > &preceedingTArgs, const clang::NamedDecl &tPar, const cling::Interpreter &interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
 
static bool areEqualValues (const clang::TemplateArgument &tArg, const clang::NamedDecl &tPar)
 std::cout << "Are equal values?\n";
 
static void CreateNameTypeMap (const clang::CXXRecordDecl &cl, ROOT::MembersTypeMap_t &nameType)
 Create the data member name-type map for given class.
 
int dumpDeclForAssert (const clang::Decl &D, const char *commentStart)
 
const clang::DeclContext * GetEnclosingSpace (const clang::RecordDecl &cl)
 
static clang::SourceLocation getFinalSpellingLoc (clang::SourceManager &sourceManager, clang::SourceLocation sourceLoc)
 
const clang::CXXMethodDecl * GetMethodWithProto (const clang::Decl *cinfo, const char *method, const char *proto, const cling::Interpreter &interp, bool diagnose)
 
std::string ROOT::TMetaUtils::GetRealPath (const std::string &path)
 
static bool hasSomeTypedefSomewhere (const clang::Type *T)
 
bool IsTemplate (const clang::Decl &cl)
 
static bool isTypeWithDefault (const clang::NamedDecl *nDecl)
 Check if this NamedDecl is a template parameter with a default argument.
 
static void KeepNParams (clang::QualType &normalizedType, const clang::QualType &vanillaType, const cling::Interpreter &interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
 This function allows to manipulate the number of arguments in the type of a template specialisation.
 
static bool RecurseKeepNParams (clang::TemplateArgument &normTArg, const clang::TemplateArgument &tArg, const cling::Interpreter &interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt, const clang::ASTContext &astCtxt)
 
static void replaceEnvVars (const char *varname, std::string &txt)
 Reimplementation of TSystem::ExpandPathName() that cannot be used from TMetaUtils.
 
static int TreatSingleTemplateArg (const clang::TemplateArgument &arg, std::string &argFwdDecl, const cling::Interpreter &interpreter, bool acceptStl=false)
 

Typedef Documentation

◆ TNCtxtFullQual

Function Documentation

◆ areEqualTypes()

static bool areEqualTypes ( const clang::TemplateArgument &  tArg,
llvm::SmallVectorImpl< clang::TemplateArgument > &  preceedingTArgs,
const clang::NamedDecl &  tPar,
const cling::Interpreter &  interp,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
)
static

Definition at line 3560 of file TClingUtils.cxx.

◆ areEqualValues()

static bool areEqualValues ( const clang::TemplateArgument &  tArg,
const clang::NamedDecl &  tPar 
)
static

std::cout << "Are equal values?\n";

Definition at line 3661 of file TClingUtils.cxx.

◆ CreateNameTypeMap()

static void CreateNameTypeMap ( const clang::CXXRecordDecl &  cl,
ROOT::MembersTypeMap_t nameType 
)
static

Create the data member name-type map for given class.

Definition at line 1434 of file TClingUtils.cxx.

◆ dumpDeclForAssert()

int dumpDeclForAssert ( const clang::Decl &  D,
const char *  commentStart 
)

Definition at line 4131 of file TClingUtils.cxx.

◆ GetEnclosingSpace()

const clang::DeclContext * GetEnclosingSpace ( const clang::RecordDecl &  cl)

Definition at line 2200 of file TClingUtils.cxx.

◆ getFinalSpellingLoc()

static clang::SourceLocation getFinalSpellingLoc ( clang::SourceManager &  sourceManager,
clang::SourceLocation  sourceLoc 
)
static

Definition at line 3284 of file TClingUtils.cxx.

◆ GetMethodWithProto()

const clang::CXXMethodDecl * GetMethodWithProto ( const clang::Decl *  cinfo,
const char *  method,
const char *  proto,
const cling::Interpreter &  interp,
bool  diagnose 
)

Definition at line 1101 of file TClingUtils.cxx.

◆ hasSomeTypedefSomewhere()

static bool hasSomeTypedefSomewhere ( const clang::Type *  T)
static

Definition at line 4477 of file TClingUtils.cxx.

◆ IsTemplate()

bool IsTemplate ( const clang::Decl &  cl)
inline

Definition at line 716 of file TClingUtils.cxx.

◆ isTypeWithDefault()

static bool isTypeWithDefault ( const clang::NamedDecl *  nDecl)
static

Check if this NamedDecl is a template parameter with a default argument.

This is a single interface to treat both integral and type parameters. Returns true if this is the case, false otherwise

Definition at line 3691 of file TClingUtils.cxx.

◆ KeepNParams()

static void KeepNParams ( clang::QualType &  normalizedType,
const clang::QualType &  vanillaType,
const cling::Interpreter &  interp,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt 
)
static

This function allows to manipulate the number of arguments in the type of a template specialisation.

Definition at line 3759 of file TClingUtils.cxx.

◆ RecurseKeepNParams()

static bool RecurseKeepNParams ( clang::TemplateArgument &  normTArg,
const clang::TemplateArgument &  tArg,
const cling::Interpreter &  interp,
const ROOT::TMetaUtils::TNormalizedCtxt normCtxt,
const clang::ASTContext &  astCtxt 
)
static

Definition at line 3709 of file TClingUtils.cxx.

◆ replaceEnvVars()

static void replaceEnvVars ( const char *  varname,
std::string &  txt 
)
static

Reimplementation of TSystem::ExpandPathName() that cannot be used from TMetaUtils.

Definition at line 4952 of file TClingUtils.cxx.

◆ TreatSingleTemplateArg()

static int TreatSingleTemplateArg ( const clang::TemplateArgument &  arg,
std::string &  argFwdDecl,
const cling::Interpreter &  interpreter,
bool  acceptStl = false 
)
static

Definition at line 5294 of file TClingUtils.cxx.