12#ifndef ROOT_TMetaUtils
13#define ROOT_TMetaUtils
20#include <unordered_set>
28#if defined(__GNUC__) && !defined(__clang__)
29#pragma GCC diagnostic push
30#pragma GCC diagnostic ignored "-Wpragmas"
31#pragma GCC diagnostic ignored "-Wclass-memaccess"
34#include "clang/Basic/Module.h"
36#if defined(__GNUC__) && !defined(__clang__)
37#pragma GCC diagnostic pop
47 class ClassTemplateDecl;
48 class ClassTemplateSpecializationDecl;
49 class CompilerInstance;
50 class CXXBaseSpecifier;
66 class TemplateArgument;
67 class TemplateArgumentList;
68 class TemplateParameterList;
71 class TypedefNameDecl;
72 struct PrintingPolicy;
100class AnnotatedRecordDecl;
107 static const std::string
iotype(
"iotype");
108 static const std::string
name(
"name");
110 static const std::string
ioname(
"ioname");
121 const cling::Interpreter &interp,
123 std::ostream& dictStream,
124 bool isAutoStreamer);
156 bool replace =
false);
178 bool *shuttingDownPtr,
179 const int *pgDebug = 0);
185 bool IsDeclaredScope(
const std::string &base,
bool &isInlined)
override;
194 const std::string &normalizedName);
216 const clang::RecordDecl *decl,
219 bool rRequestNoInputOperator,
220 bool rRequestOnlyTClass,
221 int rRequestedVersionNumber,
222 const cling::Interpreter &interpret,
226 const clang::RecordDecl *decl,
227 const char *requestName,
230 bool rRequestNoInputOperator,
231 bool rRequestOnlyTClass,
232 int rRequestedVersionNumber,
233 const cling::Interpreter &interpret,
238 const clang::RecordDecl *decl,
239 const char *requestedName,
242 bool rRequestNoInputOperator,
243 bool rRequestOnlyTClass,
244 int rRequestedVersionNumber,
245 const cling::Interpreter &interpret,
250 const clang::RecordDecl *decl,
251 const char *requestedName,
252 unsigned int nTemplateArgsToSkip,
255 bool rRequestNoInputOperator,
256 bool rRequestOnlyTClass,
257 int rRequestedVersionNumber,
258 const cling::Interpreter &interpret,
292 operator clang::RecordDecl
const *()
const {
319 const clang::CXXRecordDecl *
GetType()
const;
336 const std::string& propName,
337 std::string& propValue);
341 const std::string& propName,
353 const cling::Interpreter &interpret,
357llvm::StringRef
DataMemberInfo__ValidArrayIndex(
const cling::Interpreter& interp,
const clang::DeclaratorDecl &
m,
int *errnum =
nullptr, llvm::StringRef *errstr =
nullptr);
371const clang::FunctionDecl*
ClassInfo__HasMethod(
const clang::DeclContext *cl,
char const*,
const cling::Interpreter& interp);
374void CreateNameTypeMap(clang::CXXRecordDecl
const&, std::map<std::string, ROOT::Internal::TSchemaType>&);
378 const clang::NamedDecl &forcontext,
379 const clang::QualType &qti,
382 const cling::Interpreter &interp,
386bool IsBase(
const clang::CXXRecordDecl *cl,
const clang::CXXRecordDecl *base,
const clang::CXXRecordDecl *context,
const cling::Interpreter &interp);
389bool IsBase(
const clang::FieldDecl &
m,
const char* basename,
const cling::Interpreter &interp);
407bool HasNewMerge(clang::CXXRecordDecl
const*,
const cling::Interpreter&);
410bool HasOldMerge(clang::CXXRecordDecl
const*,
const cling::Interpreter&);
422bool NeedDestructor(clang::CXXRecordDecl
const*,
const cling::Interpreter&);
429 const cling::Interpreter&,
bool diagnose);
438void GetQualifiedName(std::string &qual_name,
const clang::QualType &
type,
const clang::NamedDecl &forcontext);
462void GetQualifiedName(std::string &qual_name,
const clang::RecordDecl &recordDecl);
477int GetClassVersion(
const clang::RecordDecl *cl,
const cling::Interpreter &interp);
492 const std::function<
void(
const clang::Module::Header &)> &closure,
493 bool includeDirectlyUsedModules =
true);
508std::string
TrueName(
const clang::FieldDecl &
m);
512 const cling::Interpreter &
gInterp,
519 const clang::CXXRecordDecl *decl,
520 const cling::Interpreter &interp,
529 const cling::Interpreter &
gInterp,
535 const cling::Interpreter &interp,
537 std::ostream& finalString,
544 const clang::CXXRecordDecl *decl,
545 const cling::Interpreter &interp,
548 bool& needCollectionProxy);
552 const clang::CXXRecordDecl* clxx,
553 const cling::Interpreter &interp,
558 const clang::CXXRecordDecl* clxx,
559 const cling::Interpreter &interp,
564std::string
GetFileName(
const clang::Decl& decl,
const cling::Interpreter& interp);
603 const clang::TypeDecl* typeDecl,
604 const cling::Interpreter &interpreter);
609clang::QualType
GetTypeForIO(
const clang::QualType& templateInstanceType,
610 const cling::Interpreter &interpreter,
617std::pair<std::string,clang::QualType>
GetNameTypeForIO(
const clang::QualType& templateInstanceType,
618 const cling::Interpreter &interpreter,
624llvm::StringRef
GetComment(
const clang::Decl &decl, clang::SourceLocation *loc = 0);
628bool HasClassDefMacro(
const clang::Decl *decl,
const cling::Interpreter &interpreter);
632llvm::StringRef
GetClassComment(
const clang::CXXRecordDecl &decl, clang::SourceLocation *loc,
const cling::Interpreter &interpreter);
648 Redecl = Redecl->getMostRecentDecl();
649 while (Redecl && !Redecl->hasAttrs())
650 Redecl = Redecl->getPreviousDecl();
679bool IsOfType(
const clang::CXXRecordDecl &cl,
const std::string&
type,
const cling::LookupHelper& lh);
700 clang::ClassTemplateDecl*& ctd,
701 clang::ClassTemplateSpecializationDecl*& ctsd);
709 std::list<std::pair<std::string,bool> >&);
712 std::list<std::pair<std::string,bool> >&);
716 std::list<std::pair<std::string,unsigned int> >& enclosingSc);
726void ReplaceAll(std::string& str,
const std::string& from,
const std::string& to,
bool recurse=
false);
733 static unsigned int gNumberOfErrors = 0;
734 return gNumberOfErrors;
741 static bool gWarningsAreErrors =
false;
742 return gWarningsAreErrors;
753inline void LevelPrint(
bool prefix,
int level,
const char *location,
const char *fmt, va_list ap)
758 const char *
type = 0;
773 if (!location || !location[0]) {
774 if (prefix) fprintf(stderr,
"%s: ",
type);
775 vfprintf(stderr, (
const char*)
va_(fmt), ap);
777 if (prefix) fprintf(stderr,
"%s in <%s>: ",
type, location);
778 else fprintf(stderr,
"In <%s>: ", location);
779 vfprintf(stderr, (
const char*)
va_(fmt), ap);
792inline void Error(
const char *location,
const char *
va_(fmt), ...)
795 va_start(ap,
va_(fmt));
802inline void SysError(
const char *location,
const char *
va_(fmt), ...)
805 va_start(ap,
va_(fmt));
812inline void Info(
const char *location,
const char *
va_(fmt), ...)
815 va_start(ap,
va_(fmt));
822inline void Warning(
const char *location,
const char *
va_(fmt), ...)
825 va_start(ap,
va_(fmt));
832inline void Fatal(
const char *location,
const char *
va_(fmt), ...)
835 va_start(ap,
va_(fmt));
844bool EndsWith(
const std::string &theString,
const std::string &theSubstring);
847bool BeginsWith(
const std::string &theString,
const std::string &theSubstring);
856namespace AST2SourceTools {
860 bool (*ignoreFiles)(
const clang::PresumedLoc&) ,
861 const cling::Interpreter& interp, std::string *logs);
865 const clang::TemplateParameterList& tmplParamList,
866 const cling::Interpreter& interpreter);
872const clang::RecordDecl*
EncloseInScopes(
const clang::Decl& decl, std::string& defString);
876 const cling::Interpreter& interpreter,
877 std::string& defString,
878 bool acceptStl=
false);
882 const cling::Interpreter& interpreter,
883 std::string& defString);
887 const cling::Interpreter& interpreter,
888 std::string& defString,
889 const std::string &normalizedName);
891int GetDefArg(
const clang::ParmVarDecl& par, std::string& valAsString,
const clang::PrintingPolicy& pp);
895 const cling::Interpreter& interpreter,
896 std::string& defString);
899 const cling::Interpreter& interpreter,
900 std::string& fwdDeclString,
901 std::unordered_set<std::string>* fwdDeclSet=
nullptr);
cling::Interpreter * gInterp
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void input
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 filename
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 result
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
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
Type
enumeration specifying the integration types.
void(off) SmallVectorTemplateBase< T
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.
static Roo_reg_AGKInteg1D instance