ASTConsumer.cpp 954 B

123456789101112131415161718192021222324252627282930
  1. //===--- ASTConsumer.cpp - Abstract interface for reading ASTs --*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // This file defines the ASTConsumer class.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #include "clang/AST/ASTConsumer.h"
  13. #include "clang/AST/Decl.h"
  14. #include "clang/AST/DeclGroup.h"
  15. using namespace clang;
  16. bool ASTConsumer::HandleTopLevelDecl(DeclGroupRef D) {
  17. return true;
  18. }
  19. void ASTConsumer::HandleInterestingDecl(DeclGroupRef D) {
  20. HandleTopLevelDecl(D);
  21. }
  22. void ASTConsumer::HandleTopLevelDeclInObjCContainer(DeclGroupRef D) {}
  23. void ASTConsumer::HandleImplicitImportDecl(ImportDecl *D) {
  24. HandleTopLevelDecl(DeclGroupRef(D));
  25. }