================
@@ -170,16 +170,14 @@ void test_nested_switch() {
   }
 }
 
-// Test that if all the values of an enum covered, that the 'default' branch
-// is unreachable.
+// Test that a warning is not emitted if the code is unreachable.
 enum Values { A, B, C, D };
 void test_all_enums_covered(enum Values v) {
----------------
jeremy-rifkin wrote:

Thanks for taking a look. What I was trying to do here was make a control flow 
graph where the out of bounds access happened in a path clang knew was 
unreachable (and thus not fire). I'm not sure if that's tested anywhere else. 
Checking if the warning is emitted here with the switch seems a little 
redundant to me with other checks about no longer assuming the default path is 
unreachable if enum values are covered. Thoughts?

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

Reply via email to