<commit_before>//===--- ASTConsumer.h - Abstract interface for reading ASTs ----*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//  This file defines the ASTConsumer class.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_AST_ASTCONSUMER_H
#define LLVM_CLANG_AST_ASTCONSUMER_H

namespace clang {
  class ASTContext;
  class TranslationUnit;
  class Decl;
  class TagDecl;
  class HandleTagDeclDefinition;
  
/// ASTConsumer - This is an abstract interface that should be implemented by
/// clients that read ASTs.  This abstraction layer allows the client to be
/// independent of the AST producer (e.g. parser vs AST dump file reader, etc).
class ASTConsumer {
public:
  virtual ~ASTConsumer();
  
  /// Initialize - This is called to initialize the consumer, providing the
  /// ASTContext.
  virtual void Initialize(ASTContext &Context) {}
  
  virtual void InitializeTU(TranslationUnit& TU);
  
  /// HandleTopLevelDecl - Handle the specified top-level declaration.  This is
  ///  called by HandleTopLevelDeclaration to process every top-level Decl*.
  virtual void HandleTopLevelDecl(Decl *D) {}
  
  /// HandleTranslationUnit - This method is called when the ASTs for entire
  ///  translation unit have been parsed.<commit_msg>fix a comment that was forgotten in r54071<commit_after>//===--- ASTConsumer.h - Abstract interface for reading ASTs ----*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//  This file defines the ASTConsumer class.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_AST_ASTCONSUMER_H
#define LLVM_CLANG_AST_ASTCONSUMER_H

namespace clang {
  class ASTContext;
  class TranslationUnit;
  class Decl;
  class TagDecl;
  class HandleTagDeclDefinition;
  
/// ASTConsumer - This is an abstract interface that should be implemented by
/// clients that read ASTs.  This abstraction layer allows the client to be
/// independent of the AST producer (e.g. parser vs AST dump file reader, etc).
class ASTConsumer {
public:
  virtual ~ASTConsumer();
  
  /// Initialize - This is called to initialize the consumer, providing the
  /// ASTContext.
  virtual void Initialize(ASTContext &Context) {}
  
  virtual void InitializeTU(TranslationUnit& TU);
  
  /// HandleTopLevelDecl - Handle the specified top-level declaration.  This is
  ///  called by the parser to process every top-level Decl*. Note that D can
  ///  be the head of a chain of Decls (e.g. for `int a, b` the chain will have
  ///  two elements). Use ScopedDecl::getNextDeclarator() to walk the chain.
  virtual void HandleTopLevelDecl(Decl *D) {}
  
  /// HandleTranslationUnit - This method is called when the ASTs for entire
  ///  translation unit have been parsed.
{'fraction_non_alphanumeric': 0.18240941467946734, 'fraction_numerical': 0.001548467017652524, 'mean_word_length': 2.2171314741035855, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7126352', 'n_tokens_mistral': 845, 'n_tokens_neox': 802, 'n_words': 326}