Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:36:25

0001 //===-- NoopAnalysis.h ------------------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 //  This file defines a NoopAnalysis class that just uses the builtin transfer.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOPANALYSIS_H
0014 #define LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOPANALYSIS_H
0015 
0016 #include "clang/AST/ASTContext.h"
0017 #include "clang/Analysis/CFG.h"
0018 #include "clang/Analysis/FlowSensitive/DataflowAnalysis.h"
0019 #include "clang/Analysis/FlowSensitive/DataflowEnvironment.h"
0020 #include "clang/Analysis/FlowSensitive/NoopLattice.h"
0021 
0022 namespace clang {
0023 namespace dataflow {
0024 
0025 class NoopAnalysis : public DataflowAnalysis<NoopAnalysis, NoopLattice> {
0026 public:
0027   NoopAnalysis(ASTContext &Context)
0028       : DataflowAnalysis<NoopAnalysis, NoopLattice>(Context) {}
0029 
0030   NoopAnalysis(ASTContext &Context, DataflowAnalysisOptions Options)
0031       : DataflowAnalysis<NoopAnalysis, NoopLattice>(Context, Options) {}
0032 
0033   static NoopLattice initialElement() { return {}; }
0034 
0035   void transfer(const CFGElement &E, NoopLattice &L, Environment &Env) {}
0036 };
0037 
0038 } // namespace dataflow
0039 } // namespace clang
0040 
0041 #endif // LLVM_CLANG_ANALYSIS_FLOWSENSITIVE_NOOPANALYSIS_H