[analyzer] Enable move semantics for CallDescriptionMap

CallDescriptionMap is supposed to be immutable and opaque about the
stored CallDescriptions, but moving a CallDescriptionMap does not
violate these principles.

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D115931
This commit is contained in:
Endre Fülöp 2021-12-19 13:01:30 +01:00
parent 6e30cb7673
commit e0321eb861
1 changed files with 3 additions and 0 deletions

View File

@ -141,6 +141,9 @@ public:
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.