[PATCH] D130793: [clang-tidy] adjust treating of array-of-pointers when 'AnalyzePointers' is deactivated

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 27 02:33:05 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/test/clang-tidy/checkers/misc/const-correctness-pointer-as-values.cpp:27-30
+  for (const int *p_local1 : p_local0) {
+  // CHECK-MESSAGES: [[@LINE-1]]:8: warning: variable 'p_local1' of type 'const int *' can be declared 'const'
+  // CHECK-FIXES: for (const int *const p_local1 : p_local0)
+  }
----------------
Wouldn't this behaviour be expected before the changes added in this patch, as p_local1 isn't an array type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130793/new/

https://reviews.llvm.org/D130793



More information about the cfe-commits mailing list