[clang-tools-extra] [clang-tidy][NFC] Fix misc-const-correctness warnings (10/N) (PR #167127)

via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 8 07:20:54 PST 2025


================
@@ -147,18 +148,19 @@ static Matcher<NamedDecl> hasStdIteratorName() {
 /// recordDecl(hasStdContainerName()) matches \c vector and \c forward_list
 /// but not \c my_vec.
 static Matcher<NamedDecl> hasStdContainerName() {
-  static StringRef ContainerNames[] = {"array",         "deque",
-                                       "forward_list",  "list",
-                                       "vector",
+  static const StringRef ContainerNames[] = {
----------------
EugeneZelenko wrote:

Since array is big, may be ADT set should be used instead? Sure, this is for dedicated pull request.

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


More information about the cfe-commits mailing list