1 //===--- LoopWidening.h - Widen loops ---------------------------*- 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 /// \file 9 /// This header contains the declarations of functions which are used to widen 10 /// loops which do not otherwise exit. The widening is done by invalidating 11 /// anything which might be modified by the body of the loop. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_LOOPWIDENING_H 16 #define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_LOOPWIDENING_H 17 18 #include "clang/Analysis/CFG.h" 19 #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" 20 21 namespace clang { 22 namespace ento { 23 24 /// Get the states that result from widening the loop. 25 /// 26 /// Widen the loop by invalidating anything that might be modified 27 /// by the loop body in any iteration. 28 ProgramStateRef getWidenedLoopState(ProgramStateRef PrevState, 29 const LocationContext *LCtx, 30 unsigned BlockCount, const Stmt *LoopStmt); 31 32 } // end namespace ento 33 } // end namespace clang 34 35 #endif 36