[PATCH] D145138: Implement FixIts for C arrays

Chris Cotter via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 1 18:41:34 PST 2023


ccotter created this revision.
Herald added a subscriber: carlosgalvezp.
Herald added a reviewer: njames93.
Herald added a project: All.
ccotter requested review of this revision.
Herald added a project: clang-tools-extra.
Herald added a subscriber: cfe-commits.

Add FixIts for C arrays declared in function definitions.
In this change, we'll generate FixIts for statically sized arrays
but not variable sized arrays. There are a few other edge cases not
implemented, but this change covers most common cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145138

Files:
  clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.cpp
  clang-tools-extra/clang-tidy/modernize/AvoidCArraysCheck.h
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.cpp
  clang-tools-extra/clang-tidy/modernize/UseTrailingReturnTypeCheck.h
  clang-tools-extra/clang-tidy/utils/CMakeLists.txt
  clang-tools-extra/clang-tidy/utils/LexerUtils.cpp
  clang-tools-extra/clang-tidy/utils/TypeUtils.cpp
  clang-tools-extra/clang-tidy/utils/TypeUtils.h
  clang-tools-extra/docs/ReleaseNotes.rst
  clang-tools-extra/docs/clang-tidy/checks/modernize/avoid-c-arrays.rst
  clang-tools-extra/test/clang-tidy/checkers/modernize/avoid-c-arrays-cxx17.cpp
  clang-tools-extra/test/clang-tidy/checkers/modernize/avoid-c-arrays.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145138.501731.patch
Type: text/x-patch
Size: 58291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230302/a95b89e2/attachment-0001.bin>


More information about the cfe-commits mailing list