[clang-tools-extra] [clang-tidy] Adds readability-redundant-const check (PR #189733)

Berkay Sahin via cfe-commits cfe-commits at lists.llvm.org
Sat Jul 11 02:09:48 PDT 2026


================
@@ -0,0 +1,171 @@
+// RUN: %check_clang_tidy -std=c++11-or-later %s readability-redundant-const %t
+
+struct Foo {};
+
+constexpr int n1 = 10;
+const int n2 = 20;
+constexpr Foo n3 = {};
+
+constexpr const int p1 = 10;
----------------
berkaysahiin wrote:

OK. so I believe the current `p3` test case should be enough then.

https://github.com/llvm/llvm-project/pull/189733


More information about the cfe-commits mailing list