clang 20.0.0git
ModelConsumer.h
Go to the documentation of this file.
1//===-- ModelConsumer.h -----------------------------------------*- 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/// \file
10/// This file implements clang::ento::ModelConsumer which is an
11/// ASTConsumer for model files.
12///
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_CLANG_STATICANALYZER_FRONTEND_MODELCONSUMER_H
16#define LLVM_CLANG_STATICANALYZER_FRONTEND_MODELCONSUMER_H
17
19#include "llvm/ADT/StringMap.h"
20
21namespace clang {
22
23class Stmt;
24
25namespace ento {
26
27/// ASTConsumer to consume model files' AST.
28///
29/// This consumer collects the bodies of function definitions into a StringMap
30/// from a model file.
31class ModelConsumer : public ASTConsumer {
32public:
33 ModelConsumer(llvm::StringMap<Stmt *> &Bodies);
34
35 bool HandleTopLevelDecl(DeclGroupRef D) override;
36
37private:
38 llvm::StringMap<Stmt *> &Bodies;
39};
40}
41}
42
43#endif
const Decl * D
ASTConsumer - This is an abstract interface that should be implemented by clients that read ASTs.
Definition: ASTConsumer.h:34
ASTConsumer to consume model files' AST.
Definition: ModelConsumer.h:31
bool HandleTopLevelDecl(DeclGroupRef D) override
HandleTopLevelDecl - Handle the specified top-level declaration.
The JSON file list parser is used to communicate input to InstallAPI.