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