=?utf-8?q?Kristóf?= Umann <dkszelet...@gmail.com>,
=?utf-8?q?Kristóf?= Umann <dkszelet...@gmail.com>,
=?utf-8?q?Kristóf?= Umann <dkszelet...@gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/94...@github.com>


================
@@ -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
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to