1 //===-- NoopLattice.h -------------------------------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file defines the lattice with exactly one element.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOP_LATTICE_H
14 #define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOP_LATTICE_H
16 #include "clang/Analysis/FlowSensitive/DataflowLattice.h"
22 /// Trivial lattice for dataflow analysis with exactly one element.
24 /// Useful for analyses that only need the Environment and nothing more.
27 bool operator==(const NoopLattice &Other) const { return true; }
29 LatticeJoinEffect join(const NoopLattice &Other) {
30 return LatticeJoinEffect::Unchanged;
34 inline std::ostream &operator<<(std::ostream &OS, const NoopLattice &) {
38 } // namespace dataflow
41 #endif // LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOP_LATTICE_H