1*e5dd7070Spatrick //=== Move.h - Tracking moved-from objects. ------------------------*- C++ -*-// 2*e5dd7070Spatrick // 3*e5dd7070Spatrick // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*e5dd7070Spatrick // See https://llvm.org/LICENSE.txt for license information. 5*e5dd7070Spatrick // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*e5dd7070Spatrick // 7*e5dd7070Spatrick //===----------------------------------------------------------------------===// 8*e5dd7070Spatrick // 9*e5dd7070Spatrick // Defines inter-checker API for the use-after-move checker. It allows 10*e5dd7070Spatrick // dependent checkers to figure out if an object is in a moved-from state. 11*e5dd7070Spatrick // 12*e5dd7070Spatrick //===----------------------------------------------------------------------===// 13*e5dd7070Spatrick 14*e5dd7070Spatrick #ifndef LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MOVE_H 15*e5dd7070Spatrick #define LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MOVE_H 16*e5dd7070Spatrick 17*e5dd7070Spatrick #include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h" 18*e5dd7070Spatrick 19*e5dd7070Spatrick namespace clang { 20*e5dd7070Spatrick namespace ento { 21*e5dd7070Spatrick namespace move { 22*e5dd7070Spatrick 23*e5dd7070Spatrick /// Returns true if the object is known to have been recently std::moved. 24*e5dd7070Spatrick bool isMovedFrom(ProgramStateRef State, const MemRegion *Region); 25*e5dd7070Spatrick 26*e5dd7070Spatrick } // namespace move 27*e5dd7070Spatrick } // namespace ento 28*e5dd7070Spatrick } // namespace clang 29*e5dd7070Spatrick 30*e5dd7070Spatrick #endif // LLVM_CLANG_LIB_STATICANALYZER_CHECKERS_MOVE_H 31