[clang-tools-extra] [clang-tidy][misc-const-correctness] fix fp when using const array type. (PR #133018)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 27 04:29:10 PDT 2025
================
@@ -1007,3 +1007,11 @@ template <typename T> void f() {
x[T{}] = 3;
}
} // namespace gh127776_false_positive
+
+namespace gh132931_false_positive {
+using T = const int;
+void valid(int i) {
+ const int arr0[] = {1, 2, 3};
+ T arr1[] = {1, 2, 3};
----------------
carlosgalvezp wrote:
Ah sorry I see now `T` is `const int` :man_facepalming:
https://github.com/llvm/llvm-project/pull/133018
More information about the cfe-commits
mailing list