================
@@ -178,3 +178,41 @@ auto b() {
 }
 } // namespace test6
 #endif
+
+#if __cplusplus >= 201402L
+// ensure lambda in non-dependent context generate same diagnostics as 
function[ template]
+namespace lambda_in_non_dependent_context {
+void f1() {
+  0, 0; // expected-warning {{left operand of comma operator has no effect}}
+  return;
+  0, 0;
----------------
zwuis wrote:

We have warnings controlled by `-Wunreachable-code` but it isn't enabled by 
default.

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

Reply via email to