diff --git a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp --- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -269,7 +269,7 @@ // initialize the state of each basic block differently. MaybeState.emplace(Analysis.typeErasedInitialElement(), AC.InitEnv); } - return *MaybeState; + return std::move(*MaybeState); } /// Built-in transfer function for `CFGStmt`.