clang
20.0.0git
include
clang
Analysis
FlowSensitive
NoopAnalysis.h
Go to the documentation of this file.
1
//===-- NoopAnalysis.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
// This file defines a NoopAnalysis class that just uses the builtin transfer.
10
//
11
//===----------------------------------------------------------------------===//
12
13
#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOPANALYSIS_H
14
#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOPANALYSIS_H
15
16
#include "
clang/AST/ASTContext.h
"
17
#include "
clang/Analysis/CFG.h
"
18
#include "
clang/Analysis/FlowSensitive/DataflowAnalysis.h
"
19
#include "
clang/Analysis/FlowSensitive/DataflowEnvironment.h
"
20
#include "
clang/Analysis/FlowSensitive/NoopLattice.h
"
21
22
namespace
clang
{
23
namespace
dataflow {
24
25
class
NoopAnalysis
:
public
DataflowAnalysis
<NoopAnalysis, NoopLattice> {
26
public
:
27
NoopAnalysis
(
ASTContext
&Context)
28
:
DataflowAnalysis
<
NoopAnalysis
,
NoopLattice
>(Context) {}
29
30
NoopAnalysis
(
ASTContext
&Context,
DataflowAnalysisOptions
Options)
31
:
DataflowAnalysis
<
NoopAnalysis
,
NoopLattice
>(Context, Options) {}
32
33
static
NoopLattice
initialElement
() {
return
{}; }
34
35
void
transfer
(
const
CFGElement
&
E
,
NoopLattice
&L,
Environment
&
Env
) {}
36
};
37
38
}
// namespace dataflow
39
}
// namespace clang
40
41
#endif
// LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOPANALYSIS_H
ASTContext.h
Defines the clang::ASTContext interface.
CFG.h
E
Expr * E
Definition:
CheckExprLifetime.cpp:198
DataflowAnalysis.h
DataflowEnvironment.h
Env
const Environment & Env
Definition:
HTMLLogger.cpp:148
NoopLattice.h
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition:
ASTContext.h:187
clang::CFGElement
Represents a top-level expression in a basic block.
Definition:
CFG.h:55
clang::dataflow::DataflowAnalysis
Base class template for dataflow analyses built on a single lattice type.
Definition:
DataflowAnalysis.h:80
clang::dataflow::Environment
Holds the state of the program (store and heap) at a given program point.
Definition:
DataflowEnvironment.h:65
clang::dataflow::NoopAnalysis
Definition:
NoopAnalysis.h:25
clang::dataflow::NoopAnalysis::NoopAnalysis
NoopAnalysis(ASTContext &Context, DataflowAnalysisOptions Options)
Definition:
NoopAnalysis.h:30
clang::dataflow::NoopAnalysis::transfer
void transfer(const CFGElement &E, NoopLattice &L, Environment &Env)
Definition:
NoopAnalysis.h:35
clang::dataflow::NoopAnalysis::NoopAnalysis
NoopAnalysis(ASTContext &Context)
Definition:
NoopAnalysis.h:27
clang::dataflow::NoopAnalysis::initialElement
static NoopLattice initialElement()
Definition:
NoopAnalysis.h:33
clang::dataflow::NoopLattice
Trivial lattice for dataflow analysis with exactly one element.
Definition:
NoopLattice.h:25
clang
The JSON file list parser is used to communicate input to InstallAPI.
Definition:
CalledOnceCheck.h:17
clang::dataflow::DataflowAnalysisOptions
Definition:
TypeErasedDataflowAnalysis.h:34
Generated on Fri Nov 15 2024 16:40:59 for clang by
1.9.6