================
@@ -359,24 +360,52 @@ void UseAfterMoveFinder::getReinits(
   }
 }
 
+enum class MoveType {
+  Move,    // std::move
+  Forward, // std::forward
+};
+
+static MoveType determineMoveType(const FunctionDecl *FuncDecl) {
+  if (FuncDecl->getName() == "move")
+    return MoveType::Move;
+  if (FuncDecl->getName() == "forward")
+    return MoveType::Forward;
+
+  assert(false && "Invalid move type");
----------------
5chmidti wrote:

Use `llvm_unreachable("Invalid move type")` if this code should truly be 
unreachable (which it is from what I can tell).

https://github.com/llvm/llvm-project/pull/82673
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to