diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h @@ -141,6 +141,9 @@ CallDescriptionMap(const CallDescriptionMap &) = delete; CallDescriptionMap &operator=(const CallDescription &) = delete; + CallDescriptionMap(CallDescriptionMap &&) = default; + CallDescriptionMap &operator=(CallDescriptionMap &&) = default; + LLVM_NODISCARD const T *lookup(const CallEvent &Call) const { // Slow path: linear lookup. // TODO: Implement some sort of fast path. diff --git a/clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp b/clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp --- a/clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp +++ b/clang/unittests/StaticAnalyzer/CallDescriptionTest.cpp @@ -19,6 +19,10 @@ namespace ento { namespace { +static_assert(std::is_move_constructible>() && + std::is_move_assignable>(), + "CallDescriptionMap should support move semantics"); + // A wrapper around CallDescriptionMap that allows verifying that // all functions have been found. This is needed because CallDescriptionMap // isn't supposed to support iteration.