<commit_before>//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author:  <NAME> <<EMAIL>>
//------------------------------------------------------------------------------

#ifndef CLING_ASTREVERSION
#define CLING_ASTREVERSION

namespace clang {
  class Decl;
  class Sema;
}

namespace cling {

  class DeclReverter;
  class Transaction;

  ///\brief A simple eraser class that removes already created AST Nodes.
  ///
  class ASTNodeEraser {
  private:
    clang::Sema* m_Sema;
    DeclReverter* m_DeclReverter;
  public:
    ASTNodeEraser(clang::Sema* S);
    ~ASTNodeEraser();

    ///\brief Rolls back given transaction from the AST.
    ///
    /// Removing includes reseting various internal stuctures in the compiler to
    /// their previous states. For example it resets the lookup tables if the 
    /// declaration has name and can be looked up; Reverts the redeclaration 
    /// chain if the declaration was redeclarable and so on.
    /// Note1: that the code generated for the declaration is not removed yet.
    /// Note2: does not do dependency analysis.
    ///
    ///\param[in] T - The transaction to be removed.
    ///\returns true on success.
    ///
    bool RevertTransaction(const Transaction* T);

  protected:
    ///\brief Removes given declaration from the AST.
    ///
    /// Removing includes reseting various internal stuctures in the compiler to
    /// their previous states. For example it resets the lookup tables if the 
    /// declaration has name and can be looked up; Reverts the redeclaration 
    /// chain if the declaration was redeclarable and so on.
    /// Note1: that the code generated for the declaration is not removed yet.
    /// Note2: does not do dependency analysis.
    ///
    ///\param[in] D - The declaration to be removed.
    ///\returns true on success.
    ///
    bool RevertDecl(clang::Decl* D);
  };
} // end namespace cling

#endif // CLING_ASTREVERSION
<commit_msg>Fix typo in the include guard.<commit_after>//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// version: $Id$
// author:  <NAME> <<EMAIL>>
//------------------------------------------------------------------------------

#ifndef CLING_AST_NODE_ERASER
#define CLING_AST_NODE_ERASER

namespace clang {
  class Decl;
  class Sema;
}

namespace cling {

  class DeclReverter;
  class Transaction;

  ///\brief A simple eraser class that removes already created AST Nodes.
  ///
  class ASTNodeEraser {
  private:
    clang::Sema* m_Sema;
    DeclReverter* m_DeclReverter;

  public:
    ASTNodeEraser(clang::Sema* S);
    ~ASTNodeEraser();

    ///\brief Rolls back given transaction from the AST.
    ///
    /// Removing includes reseting various internal stuctures in the compiler to
    /// their previous states. For example it resets the lookup tables if the 
    /// declaration has name and can be looked up; Reverts the redeclaration 
    /// chain if the declaration was redeclarable and so on.
    /// Note1: that the code generated for the declaration is not removed yet.
    /// Note2: does not do dependency analysis.
    ///
    ///\param[in] T - The transaction to be removed.
    ///\returns true on success.
    ///
    bool RevertTransaction(const Transaction* T);

  protected:
    ///\brief Removes given declaration from the AST.
    ///
    /// Removing includes reseting various internal stuctures in the compiler to
    /// their previous states. For example it resets the lookup tables if the 
    /// declaration has name and can be looked up; Reverts the redeclaration 
    /// chain if the declaration was redeclarable and so on.
    /// Note1: that the code generated for the declaration is not removed yet.
    /// Note2: does not do dependency analysis.
    ///
    ///\param[in] D - The declaration to be removed.
    ///\returns true on success.
    ///
    bool RevertDecl(clang::Decl* D);
  };
} // end namespace cling

#endif // CLING_AST_NODE_ERASER

{'fraction_non_alphanumeric': 0.1667073468391506, 'fraction_numerical': 0.001952648279228704, 'mean_word_length': 2.004398826979472, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5384041', 'n_tokens_mistral': 1132, 'n_tokens_neox': 1108, 'n_words': 445}