blob: 0cf614102d02b956df2c950bf197f66620674c11 [file] [log] [blame]
Ted Kremenek2ff3e692007-11-29 23:05:17 +00001//===--- ASTConsumer.cpp - Abstract interface for reading ASTs --*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file was developed by Ted Kremenek and is distributed under
6// the University of Illinois Open Source License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file defines the ASTConsumer class.
11//
12//===----------------------------------------------------------------------===//
13
14#include "clang/AST/ASTConsumer.h"
15#include "clang/AST/Decl.h"
16
17using namespace clang;
18
19void ASTConsumer::HandleTopLevelDeclaration(Decl* d) {
20 if (ScopedDecl* sd = dyn_cast<ScopedDecl>(d))
21 while (sd) {
22 HandleTopLevelDecl(sd);
23 sd = sd->getNextDeclarator();
24 }
25 else
26 HandleTopLevelDecl(d);
27}