Author: Endre Fülöp Date: 2021-12-19T13:02:34+01:00 New Revision: e0321eb8615810c4115d46b15b60dc89f23cdbef
URL: https://github.com/llvm/llvm-project/commit/e0321eb8615810c4115d46b15b60dc89f23cdbef DIFF: https://github.com/llvm/llvm-project/commit/e0321eb8615810c4115d46b15b60dc89f23cdbef.diff LOG: [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 Added: Modified: clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h Removed: ################################################################################ diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h index 396c9a4de4400..76995f173e77b 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallDescription.h @@ -141,6 +141,9 @@ template <typename T> class CallDescriptionMap { 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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits