=?utf-8?q?Kristóf?= Umann <[email protected]>,
=?utf-8?q?Kristóf?= Umann <[email protected]>,
=?utf-8?q?Kristóf?= Umann <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -98,6 +107,19 @@ struct StreamState {
     OpenFailed /// The last open operation has failed.
   } State;
 
+  StringRef getKindStr() const {
+    switch (State) {
+    case Opened:
+      return "Opened";
+    case Closed:
+      return "Closed";
+    case OpenFailed:
+      return "OpenFailed";
+    default:
+      llvm_unreachable("Unknown StreamState!");
----------------
steakhal wrote:

Having a default case is an anti-pattern that suppresses incomplete switch 
warnings if the enumeration ever changes.
I'd suggest dropping this switch-case.

```suggestion
```

https://github.com/llvm/llvm-project/pull/94957
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to