[all-commits] [llvm/llvm-project] c3b31b: [clang-tidy] Fix `readability-container-data-point...

mitchell via All-commits all-commits at lists.llvm.org
Sun Nov 9 08:13:08 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c3b31ba19c2dc1062719afcbe265aaf7d8606540
      https://github.com/llvm/llvm-project/commit/c3b31ba19c2dc1062719afcbe265aaf7d8606540
  Author: mitchell <mitchell.xu2 at gmail.com>
  Date:   2025-11-09 (Sun, 09 Nov 2025)

  Changed paths:
    M clang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.cpp
    M clang-tools-extra/docs/ReleaseNotes.rst
    M clang-tools-extra/test/clang-tidy/checkers/readability/container-data-pointer.cpp

  Log Message:
  -----------
  [clang-tidy] Fix `readability-container-data-pointer` check (#165636)

Fix issue in readability-container-data-pointer when the container
expression is a dereference (e.g., `&(*p)[0]`). The previous fix-it
suggested `*p.data()`, which changes semantics because `.` binds tighter
than `*`. The fix now correctly suggests `(*p).data()`.

Closes [#164852](https://github.com/llvm/llvm-project/issues/164852)

---------

Co-authored-by: Baranov Victor <bar.victor.2002 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list