clang 20.0.0git
NoopLattice.h
Go to the documentation of this file.
1//===-- NoopLattice.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 the lattice with exactly one element.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOP_LATTICE_H
14#define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOP_LATTICE_H
15
17#include <ostream>
18
19namespace clang {
20namespace dataflow {
21
22/// Trivial lattice for dataflow analysis with exactly one element.
23///
24/// Useful for analyses that only need the Environment and nothing more.
26public:
27 bool operator==(const NoopLattice &Other) const { return true; }
28
31 }
32};
33
34inline std::ostream &operator<<(std::ostream &OS, const NoopLattice &) {
35 return OS << "noop";
36}
37
38} // namespace dataflow
39} // namespace clang
40
41#endif // LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOP_LATTICE_H
Trivial lattice for dataflow analysis with exactly one element.
Definition: NoopLattice.h:25
LatticeJoinEffect join(const NoopLattice &Other)
Definition: NoopLattice.h:29
bool operator==(const NoopLattice &Other) const
Definition: NoopLattice.h:27
llvm::raw_ostream & operator<<(llvm::raw_ostream &OS, Atom A)
Definition: Formula.h:125
LatticeEffect
Effect indicating whether a lattice operation resulted in a new value.
The JSON file list parser is used to communicate input to InstallAPI.
@ Other
Other implicit parameter.