[all-commits] [llvm/llvm-project] 75b2ea: [Clang][UnsafeBufferUsage] Warn about two-arg stri...

Prajwal P J via All-commits all-commits at lists.llvm.org
Wed Mar 4 10:28:26 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75b2ea57d5f4a5ae0de1b3ca1ca7eec464811b45
      https://github.com/llvm/llvm-project/commit/75b2ea57d5f4a5ae0de1b3ca1ca7eec464811b45
  Author: Prajwal P J <prajwaljalwadi at gmail.com>
  Date:   2026-03-04 (Wed, 04 Mar 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Analysis/Analyses/UnsafeBufferUsage.h
    M clang/include/clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Analysis/UnsafeBufferUsage.cpp
    M clang/lib/Sema/AnalysisBasedWarnings.cpp
    A clang/test/SemaCXX/warn-unsafe-buffer-usage-string-view.cpp

  Log Message:
  -----------
  [Clang][UnsafeBufferUsage] Warn about two-arg string_view constructors. (#180471)

"This patch extends the unsafe buffer usage warning to cover
std::string_view constructors that take a pointer and size, similar to
the existing check for std::span.

The warning message has been updated to be generic ('container
construction' instead of 'span construction') and existing tests have
been updated to match.

Fixes #166644."



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