34#include "cling/Interpreter/Interpreter.h"
35#include "cling/Interpreter/LookupHelper.h"
36#include "cling/Utils/AST.h"
38#include "clang/AST/ASTContext.h"
39#include "clang/AST/Decl.h"
40#include "clang/AST/DeclCXX.h"
41#include "clang/AST/DeclTemplate.h"
42#include "clang/AST/GlobalDecl.h"
43#include "clang/AST/PrettyPrinter.h"
44#include "clang/AST/RecordLayout.h"
45#include "clang/AST/Type.h"
46#include "clang/Basic/Specifiers.h"
47#include "clang/Frontend/CompilerInstance.h"
48#include "clang/Sema/Sema.h"
50#include "llvm/ExecutionEngine/GenericValue.h"
51#include "llvm/Support/Casting.h"
52#include "llvm/Support/raw_ostream.h"
63 if (
const NamedDecl* ND = llvm::dyn_cast<NamedDecl>(decl)) {
64 PrintingPolicy Policy(decl->getASTContext().getPrintingPolicy());
65 llvm::raw_string_ostream stream(buf);
66 ND->getNameForDiagnostic(stream, Policy,
true);
72 :
TClingDeclInfo(nullptr), fInterp(interp), fFirstTime(true), fDescend(false), fIterAll(all),
73 fIsIter(true), fOffsetCache(0)
75 TranslationUnitDecl *TU =
76 interp->getCI()->getASTContext().getTranslationUnitDecl();
82 :
TClingDeclInfo(nullptr), fInterp(interp), fFirstTime(true), fDescend(false), fIterAll(
kTRUE), fIsIter(false),
85 const cling::LookupHelper& lh =
fInterp->getLookupHelper();
86 const Type *
type =
nullptr;
87 const Decl *decl = lh.findScope(
name,
88 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
89 : cling::LookupHelper::NoDiagnostics,
90 &
type, intantiateTemplate);
94 decl = lh.findScope(buf,
95 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
96 : cling::LookupHelper::NoDiagnostics,
97 &
type, intantiateTemplate);
101 const TagType *tagtype =
type->getAs<TagType>();
103 decl = tagtype->getDecl();
108 if (decl && decl->isInvalidDecl()) {
109 Error(
"TClingClassInfo",
"Found an invalid decl for %s.",
name);
117 :
TClingDeclInfo(nullptr), fInterp(interp), fFirstTime(true), fDescend(false), fIterAll(
kTRUE),
118 fIsIter(false), fOffsetCache(0)
125 :
TClingDeclInfo(nullptr), fInterp(interp), fFirstTime(true), fDescend(false), fIterAll(
kTRUE),
126 fIsIter(false), fOffsetCache(0)
147 const RecordDecl *RD = llvm::dyn_cast<RecordDecl>(
GetDecl());
150 cling::Interpreter::PushTransactionRAII RAII(
fInterp);
162 const CXXRecordDecl *CRD =
163 llvm::dyn_cast<CXXRecordDecl>(
GetDecl());
167 if (CRD->isAbstract()) {
170 if (CRD->hasUserDeclaredConstructor()) {
174 !CRD->hasUserDeclaredConstructor() &&
175 !CRD->hasTrivialDefaultConstructor()
180 CRD->hasUserProvidedDefaultConstructor() ||
181 !CRD->hasTrivialDefaultConstructor()
185 if (CRD->hasUserDeclaredDestructor()) {
188 else if (!CRD->hasTrivialDestructor()) {
191 if (CRD->hasUserDeclaredCopyAssignment()) {
194 if (CRD->isPolymorphic()) {
205 Error(
"TClingClassInfo::Delete()",
"Called while invalid!");
209 Error(
"TClingClassInfo::Delete()",
"Class is not loaded: %s",
230 Error(
"DeleteArray",
"Placement delete of an array is unsupported!\n");
257 const TypedefType *TT = llvm::dyn_cast<TypedefType>(
fType);
259 llvm::StringRef tname(TT->getDecl()->getName());
260 if (tname.equals(fname)) {
261 const NamedDecl *ndecl = llvm::dyn_cast<NamedDecl>(
GetDecl());
262 if (ndecl && !ndecl->getName().equals(fname)) {
269 const cling::LookupHelper &lh =
fInterp->getLookupHelper();
270 const FunctionTemplateDecl *fd
271 = lh.findFunctionTemplate(
GetDecl(), fname,
272 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
273 : cling::LookupHelper::NoDiagnostics,
false);
274 if (fd)
return fd->getCanonicalDecl();
283 const cling::LookupHelper &lh =
fInterp->getLookupHelper();
286 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
287 : cling::LookupHelper::NoDiagnostics);
288 if (vd)
return llvm::dyn_cast<ValueDecl>(vd->getCanonicalDecl());
304 const TypedefType *TT = llvm::dyn_cast<TypedefType>(
fType);
306 llvm::StringRef tname(TT->getDecl()->getName());
307 if (tname.equals(fname)) {
308 const NamedDecl *ndecl = llvm::dyn_cast<NamedDecl>(
GetDecl());
309 if (ndecl && !ndecl->getName().equals(fname)) {
311 return GetMethod(ndecl->getName().str().c_str());
316 const cling::LookupHelper &lh =
fInterp->getLookupHelper();
317 const FunctionDecl *fd
318 = lh.findAnyFunction(
GetDecl(), fname,
319 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
320 : cling::LookupHelper::NoDiagnostics,
340 const char *
proto,
bool objectIsConst,
355 const TypedefType *TT = llvm::dyn_cast<TypedefType>(
fType);
357 llvm::StringRef tname(TT->getDecl()->getName());
358 if (tname.equals(fname)) {
359 const NamedDecl *ndecl = llvm::dyn_cast<NamedDecl>(
GetDecl());
360 if (ndecl && !ndecl->getName().equals(fname)) {
363 objectIsConst,poffset,
370 const cling::LookupHelper& lh =
fInterp->getLookupHelper();
371 const FunctionDecl *fd;
374 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
375 : cling::LookupHelper::NoDiagnostics,
379 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
380 : cling::LookupHelper::NoDiagnostics,
383 Error(
"TClingClassInfo::GetMethod",
384 "The MatchMode %d is not supported.",
mode);
402 const clang::DeclContext* ourDC = llvm::dyn_cast<clang::DeclContext>(
GetDecl());
403 if (!fd->getDeclContext()->Equals(ourDC)
404 && !(fd->getDeclContext()->isTransparentContext()
405 && fd->getDeclContext()->getParent()->Equals(ourDC)))
409 if (poffset) *poffset = 0;
413 if (
const CXXMethodDecl *md =
414 llvm::dyn_cast<CXXMethodDecl>(fd)) {
426 const llvm::SmallVectorImpl<clang::QualType> &
proto,
434 const llvm::SmallVectorImpl<clang::QualType> &
proto,
bool objectIsConst,
449 const TypedefType *TT = llvm::dyn_cast<TypedefType>(
fType);
451 llvm::StringRef tname(TT->getDecl()->getName());
452 if (tname.equals(fname)) {
453 const NamedDecl *ndecl = llvm::dyn_cast<NamedDecl>(
GetDecl());
454 if (ndecl && !ndecl->getName().equals(fname)) {
456 return GetMethod(ndecl->getName().str().c_str(),
proto,objectIsConst,poffset,
463 const cling::LookupHelper& lh =
fInterp->getLookupHelper();
464 const FunctionDecl *fd;
467 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
468 : cling::LookupHelper::NoDiagnostics,
472 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
473 : cling::LookupHelper::NoDiagnostics,
476 Error(
"TClingClassInfo::GetMethod",
477 "The MatchMode %d is not supported.",
mode);
488 if (
const CXXMethodDecl *md =
489 llvm::dyn_cast<CXXMethodDecl>(fd)) {
507 const char *arglist,
bool objectIsConst,
515 const TypedefType *TT = llvm::dyn_cast<TypedefType>(
fType);
517 llvm::StringRef tname(TT->getDecl()->getName());
518 if (tname.equals(fname)) {
519 const NamedDecl *ndecl = llvm::dyn_cast<NamedDecl>(
GetDecl());
520 if (ndecl && !ndecl->getName().equals(fname)) {
522 return GetMethod(ndecl->getName().str().c_str(),arglist,
523 objectIsConst,poffset
537 if (!strcmp(arglist,
")")) {
541 const cling::LookupHelper &lh =
fInterp->getLookupHelper();
542 const FunctionDecl *fd
543 = lh.findFunctionArgs(
GetDecl(), fname, arglist,
544 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
545 : cling::LookupHelper::NoDiagnostics,
554 if (
const CXXMethodDecl *md =
555 llvm::dyn_cast<CXXMethodDecl>(fd)) {
580 clang_val =
static_cast<int>(num_params);
591 const CXXRecordDecl* definer = md->getParent();
592 const CXXRecordDecl* accessor =
593 llvm::cast<CXXRecordDecl>(
GetDecl());
594 if (definer != accessor) {
601 if (bci->
GetDecl() == definer) {
621 std::pair<ptrdiff_t, OffsetPtrFunc_t> offsetCache = (*iter).second;
624 return (*executableFunc)(address, isDerivedObject);
627 Error(
"TClingBaseClassInfo::Offset",
"The address of the object for virtual base offset calculation is not valid.");
632 return offsetCache.first;
640 return binfo.
Offset(address, isDerivedObject);
646 std::vector<std::string> res;
650 cling::Interpreter::PushTransactionRAII RAII(
fInterp);
651 const auto DC = dyn_cast<DeclContext>(
fDecl);
655 clang::PrintingPolicy policy(
fDecl->getASTContext().getPrintingPolicy());
656 for (
auto UD : DC->using_directives()) {
657 NamespaceDecl *NS = UD->getNominatedNamespace();
660 llvm::raw_string_ostream stream(nsName);
662 NS->getNameForDiagnostic(stream, policy,
true);
665 res.push_back(nsName);
686 return EIOCtorCategory::kAbsent;
688 auto CRD = llvm::dyn_cast<CXXRecordDecl>(
GetDecl());
691 return EIOCtorCategory::kAbsent;
694 auto kind = CheckIOConstructor(CRD,
"TRootIOCtor",
nullptr, *
fInterp);
695 if ((kind == EIOCtorCategory::kIORefType) || (kind == EIOCtorCategory::kIOPtrType)) {
696 if (type_name) *type_name =
"TRootIOCtor";
700 kind = CheckIOConstructor(CRD,
"__void__",
nullptr, *
fInterp);
701 if (kind == EIOCtorCategory::kIORefType) {
702 if (type_name) *type_name =
"__void__";
707 return CheckDefaultConstructor(CRD, *
fInterp) ? EIOCtorCategory::kDefault : EIOCtorCategory::kAbsent;
714 return fInterp->getLookupHelper()
716 gDebug > 5 ? cling::LookupHelper::WithDiagnostics
717 : cling::LookupHelper::NoDiagnostics);
727 fIter = DeclContext::decl_iterator();
731 const cling::LookupHelper& lh =
fInterp->getLookupHelper();
733 : cling::LookupHelper::NoDiagnostics,
738 SetDecl(lh.findScope(buf,
gDebug > 5 ? cling::LookupHelper::WithDiagnostics
739 : cling::LookupHelper::NoDiagnostics,
744 const TagType *tagtype =
fType->getAs<TagType>();
756 fIter = DeclContext::decl_iterator();
764 Fatal(
"TClingClassInfo::Init(tagnum)",
"Should no longer be called");
774 const TagType *tagtype =
fType->getAs<TagType>();
782 QualType qType(
fType,0);
783 static PrintingPolicy printPol(
fInterp->getCI()->getLangOpts());
784 printPol.SuppressScope =
false;
785 Error(
"TClingClassInfo::Init(const Type&)",
786 "The given type %s does not point to a Decl",
787 qType.getAsString(printPol).c_str());
803 const CXXRecordDecl *CRD =
804 llvm::dyn_cast<CXXRecordDecl>(
GetDecl());
810 const CXXRecordDecl *baseCRD =
811 llvm::dyn_cast<CXXRecordDecl>(base.
GetDecl());
812 return CRD->isDerivedFrom(baseCRD);
828 if (
auto *ED = llvm::dyn_cast<clang::EnumDecl>(
GetDecl()))
829 return ED->isScoped();
840 if (
auto ED = llvm::dyn_cast<EnumDecl>(
GetDecl())) {
842 auto Ty = ED->getIntegerType().getTypePtrOrNull();
844 Ty = Ty->getUnqualifiedDesugaredType();
845 if (
auto BTy = llvm::dyn_cast_or_null<BuiltinType>(Ty)) {
846 switch (BTy->getKind()) {
847 case BuiltinType::Bool:
850 case BuiltinType::Char_U:
851 case BuiltinType::UChar:
854 case BuiltinType::Char_S:
855 case BuiltinType::SChar:
858 case BuiltinType::UShort:
860 case BuiltinType::Short:
862 case BuiltinType::UInt:
864 case BuiltinType::Int:
866 case BuiltinType::ULong:
868 case BuiltinType::Long:
870 case BuiltinType::ULongLong:
872 case BuiltinType::LongLong:
898 const CXXRecordDecl *CRD = llvm::dyn_cast<CXXRecordDecl>(
GetDecl());
900 if (!CRD->hasDefinition()) {
904 const TagDecl *TD = llvm::dyn_cast<TagDecl>(
GetDecl());
905 if (TD && TD->getDefinition() ==
nullptr) {
936 cling::Interpreter::PushTransactionRAII RAII(
fInterp);
939 const clang::DeclContext *DC = cast<DeclContext>(
GetDecl());
941 fIter = DC->decls_begin();
943 fIter = DC->noload_decls_begin();
950 if (
const NamedDecl* ND =
951 llvm::dyn_cast<NamedDecl>(
GetDecl())) {
952 PrintingPolicy Policy(
GetDecl()->getASTContext().
953 getPrintingPolicy());
954 llvm::raw_string_ostream stream(buf);
955 ND->getNameForDiagnostic(stream, Policy,
false);
957 Error(
"TClingClassInfo::InternalNext",
958 "Next called but iteration not prepared for %s!", buf.c_str());
960 Error(
"TClingClassInfo::InternalNext",
961 "Next called but iteration not prepared!");
989 DeclContext *DC = llvm::cast<DeclContext>(*
fIter);
991 fIter = DC->decls_begin();
993 fIter = DC->noload_decls_begin();
1013 Decl::Kind DK =
fIter->getKind();
1014 if ((DK == Decl::Namespace) || (DK == Decl::Enum) ||
1015 (DK == Decl::CXXRecord) ||
1016 (DK == Decl::ClassTemplateSpecialization)) {
1017 const TagDecl *TD = llvm::dyn_cast<TagDecl>(*
fIter);
1018 if (TD && !TD->isCompleteDefinition()) {
1022 if (DK == Decl::Namespace) {
1024 if (!
fIter->isCanonicalDecl()) {
1030 if (DK != Decl::Enum) {
1032 DeclContext *DC = llvm::cast<DeclContext>(*
fIter);
1033 if ((
fIterAll && *DC->decls_begin())
1034 || (!
fIterAll && *DC->noload_decls_begin())) {
1044 if (
GetDecl()->isInvalidDecl()) {
1045 Warning(
"TClingClassInfo::Next()",
"Reached an invalid decl.");
1047 if (
const RecordDecl *RD =
1048 llvm::dyn_cast<RecordDecl>(
GetDecl())) {
1049 fType = RD->getASTContext().getRecordType(RD).getTypePtr();
1067 Error(
"TClingClassInfo::New()",
"Called while invalid!");
1071 Error(
"TClingClassInfo::New()",
"Class is not loaded: %s",
1077 std::string type_name;
1081 auto RD = dyn_cast<CXXRecordDecl>(
GetDecl());
1083 Error(
"TClingClassInfo::New()",
"This is a namespace!: %s",
1097 void* obj =
nullptr;
1102 Error(
"TClingClassInfo::New()",
"Call of default constructor "
1103 "failed to return an object for class: %s",
1116 Error(
"TClingClassInfo::New(n)",
"Called while invalid!");
1120 Error(
"TClingClassInfo::New(n)",
"Class is not loaded: %s",
1126 std::string type_name;
1131 auto RD = dyn_cast<CXXRecordDecl>(
GetDecl());
1133 Error(
"TClingClassInfo::New(n)",
"This is a namespace!: %s",
1147 void* obj =
nullptr;
1150 nullptr, (
unsigned long)
n);
1152 Error(
"TClingClassInfo::New(n)",
"Call of default constructor "
1153 "failed to return an array of class: %s",
1167 Error(
"TClingClassInfo::New(n, arena)",
"Called while invalid!");
1171 Error(
"TClingClassInfo::New(n, arena)",
"Class is not loaded: %s",
1177 std::string type_name;
1182 auto RD = dyn_cast<CXXRecordDecl>(
GetDecl());
1184 Error(
"TClingClassInfo::New(n, arena)",
"This is a namespace!: %s",
1198 void* obj =
nullptr;
1202 arena, (
unsigned long)
n);
1212 Error(
"TClingClassInfo::New(arena)",
"Called while invalid!");
1216 Error(
"TClingClassInfo::New(arena)",
"Class is not loaded: %s",
1222 std::string type_name;
1227 auto RD = dyn_cast<CXXRecordDecl>(
GetDecl());
1229 Error(
"TClingClassInfo::New(arena)",
"This is a namespace!: %s",
1243 void* obj =
nullptr;
1263 cling::Interpreter::PushTransactionRAII RAII(
fInterp);
1265 const clang::DeclContext *ctxt =
GetDecl()->getDeclContext();
1266 clang::NamespaceDecl *std_ns =
fInterp->getSema().getStdNamespace();
1267 while (ctxt && ! ctxt->isTranslationUnit()) {
1268 if (ctxt->Equals(std_ns)) {
1272 ctxt = ctxt->getParent();
1274 Decl::Kind DK =
GetDecl()->getKind();
1275 if ((DK == Decl::Namespace) || (DK == Decl::TranslationUnit)) {
1280 const TagDecl *TD = llvm::dyn_cast<TagDecl>(
GetDecl());
1289 const CXXRecordDecl *CRD =
1290 llvm::dyn_cast<CXXRecordDecl>(
GetDecl());
1294 if (CRD->isClass()) {
1296 }
else if (CRD->isStruct()) {
1298 }
else if (CRD->isUnion()) {
1301 if (CRD->hasDefinition() && CRD->isAbstract()) {
1328 Decl::Kind DK =
GetDecl()->getKind();
1329 if (DK == Decl::Namespace) {
1333 else if (DK == Decl::Enum) {
1337 const RecordDecl *RD = llvm::dyn_cast<RecordDecl>(
GetDecl());
1342 if (!RD->getDefinition()) {
1346 ASTContext &Context =
GetDecl()->getASTContext();
1347 cling::Interpreter::PushTransactionRAII RAII(
fInterp);
1348 const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
1349 int64_t
size = Layout.getSize().getQuantity();
1350 int clang_size =
static_cast<int>(
size);
1384 if (
const NamedDecl* ND =
1385 llvm::dyn_cast<NamedDecl>(
GetDecl())) {
1386 PrintingPolicy Policy(
GetDecl()->getASTContext().
1387 getPrintingPolicy());
1388 llvm::raw_string_ostream stream(
output);
1389 ND->getNameForDiagnostic(stream, Policy,
true);
1407 if (
const TagDecl *TD = llvm::dyn_cast<TagDecl>(
GetDecl())) {
1409 if (AnnotateAttr *A = TD->getAttr<AnnotateAttr>()) {
1410 std::string
attr = A->getAnnotation().str();
1426 const CXXRecordDecl *CRD =
1427 llvm::dyn_cast<CXXRecordDecl>(
GetDecl());
1428 if (CRD && !CRD->isFromASTFile()) {
1443 TTHREAD_TLS_DECL( std::string, buf);
1445 if (
const NamedDecl* ND = llvm::dyn_cast<NamedDecl>(
GetDecl())) {
1447 buf = ND->getNameAsString();
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
static std::string FullyQualifiedName(const Decl *decl)
ptrdiff_t(* OffsetPtrFunc_t)(void *, bool)
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
void Fatal(const char *location, const char *msgfmt,...)
Use this function in case of a fatal error. It will abort the program.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
R__EXTERN TVirtualMutex * gInterpreterMutex
#define R__LOCKGUARD(mutex)
#define R__WRITE_LOCKGUARD(mutex)
Emulation of the CINT BaseClassInfo class.
ptrdiff_t Offset(void *address=0, bool isDerivedObject=true) const
TClingClassInfo * GetBase() const
Emulation of the CINT CallFunc class.
void * ExecDefaultConstructor(const TClingClassInfo *info, ROOT::TMetaUtils::EIOCtorCategory kind, const std::string &type_name, void *address=nullptr, unsigned long nary=0UL)
void ExecDestructor(const TClingClassInfo *info, void *address=nullptr, unsigned long nary=0UL, bool withFree=true)
Emulation of the CINT ClassInfo class.
clang::DeclContext::decl_iterator fIter
static bool IsEnum(cling::Interpreter *interp, const char *name)
long ClassProperty() const
void Init(const char *name)
void FullName(std::string &output, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
llvm::DenseMap< const clang::Decl *, std::pair< ptrdiff_t, OffsetPtrFunc_t > > fOffsetCache
EDataType GetUnderlyingType() const
std::mutex fOffsetCacheMutex
const char * TmpltName() const
void AddBaseOffsetValue(const clang::Decl *decl, ptrdiff_t offset)
Longptr_t GetOffset(const clang::CXXMethodDecl *md) const
ptrdiff_t GetBaseOffset(TClingClassInfo *toBase, void *address, bool isDerivedObject)
void SetDecl(const clang::Decl *D)
bool IsScopedEnum() const
ROOT::TMetaUtils::EIOCtorCategory HasDefaultConstructor(bool checkio=false, std::string *type_name=nullptr) const
TClingMethodInfo GetMethodWithArgs(const char *fname, const char *arglist, Longptr_t *poffset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch, EInheritanceMode imode=kWithInheritance) const
const clang::FunctionTemplateDecl * GetFunctionTemplate(const char *fname) const
int GetMethodNArg(const char *method, const char *proto, Bool_t objectIsConst, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
bool IsValidMethod(const char *method, const char *proto, Bool_t objectIsConst, Longptr_t *offset, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch) const
bool HasMethod(const char *name) const
std::string fDeclFileName
void DeleteArray(void *arena, bool dtorOnly, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
void * New(const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
TClingMethodInfo GetMethod(const char *fname) const
const clang::ValueDecl * GetDataMember(const char *name) const
void Destruct(void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
std::vector< std::string > GetUsingNamespaces()
cling::Interpreter * fInterp
std::vector< clang::DeclContext::decl_iterator > fIterStack
bool IsBase(const char *name) const
const clang::Type * fType
void Delete(void *arena, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt) const
const clang::Decl * fDecl
virtual bool IsValid() const
virtual const clang::Decl * GetDecl() const
Emulation of the CINT MethodInfo class.
const clang::FunctionDecl * GetTargetFunctionDecl() const
Get the FunctionDecl, or if this represents a UsingShadowDecl, the underlying target FunctionDecl.
void Init(const clang::FunctionDecl *)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
R__EXTERN TVirtualRWMutex * gCoreMutex
std::string InsertStd(const char *tname)