12 #ifndef ROOT_TClingTypedefInfo
13 #define ROOT_TClingTypedefInfo
31 #include "cling/Interpreter/Interpreter.h"
32 #include "clang/AST/ASTContext.h"
33 #include "clang/AST/Decl.h"
34 #include "clang/Frontend/CompilerInstance.h"
40 namespace TMetaUtils {
41 class TNormalizedCtxt;
45 class TClingTypedefInfo final :
public TClingDeclInfo {
49 cling::Interpreter *fInterp;
52 clang::DeclContext::decl_iterator fIter;
53 std::vector<clang::DeclContext::decl_iterator> fIterStack;
58 explicit TClingTypedefInfo(cling::Interpreter *interp)
59 : TClingDeclInfo(nullptr), fInterp(interp), fFirstTime(true), fDescend(false), fTitle(
"")
61 const clang::TranslationUnitDecl *TU = fInterp->getCI()->getASTContext().getTranslationUnitDecl();
62 const clang::DeclContext *DC = llvm::cast<clang::DeclContext>(TU);
63 cling::Interpreter::PushTransactionRAII RAII(fInterp);
64 fIter = DC->decls_begin();
67 explicit TClingTypedefInfo(cling::Interpreter *,
const char *);
69 explicit TClingTypedefInfo(cling::Interpreter *,
const clang::TypedefNameDecl *);
71 void Init(
const char *name);
74 long Property()
const;
76 const char *TrueName(
const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt)
const;
77 const char *Name()
override;
82 #endif // ROOT_TClingTypedefInfo