================
@@ -0,0 +1,17 @@
+// RUN: %check_clang_tidy -std=c17 -check-suffixes=C17 %s 
modernize-redundant-zero-initializer %t
+// RUN: %check_clang_tidy -std=c23-or-later -check-suffixes=C23 %s 
modernize-redundant-zero-initializer %t
+
+char a[12] = {0};
+// CHECK-MESSAGES-C23: :[[@LINE-1]]:14: warning: redundant zero initializer; 
replace with empty braces [modernize-redundant-zero-initializer]
+// CHECK-FIXES-C23: char a[12] = {};
+
+int b[5] = {0};
+// CHECK-MESSAGES-C23: :[[@LINE-1]]:12: warning: redundant zero initializer; 
replace with empty braces
+// CHECK-FIXES-C23: int b[5] = {};
+
+// Negatives.
----------------
vbvictor wrote:

redundant comments

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

Reply via email to