[all-commits] [llvm/llvm-project] 2a80a9: [-Wunsafe-buffer-usage] Move warning-only analysis...

Ziqing Luo via All-commits all-commits at lists.llvm.org
Tue May 26 11:23:34 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a80a9d52ee17a2a3188f52a3befcb2e8ed57ae6
      https://github.com/llvm/llvm-project/commit/2a80a9d52ee17a2a3188f52a3befcb2e8ed57ae6
  Author: Ziqing Luo <ziqing_luo at apple.com>
  Date:   2026-05-26 (Tue, 26 May 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/AnalysisBasedWarnings.cpp
    M clang/test/Modules/safe_buffers_optout.cpp
    M clang/test/PCH/unsafe-buffer-usage-pragma-pch-complex.cpp
    M clang/test/PCH/unsafe-buffer-usage-pragma-pch-cross-files-2.cpp
    M clang/test/PCH/unsafe-buffer-usage-pragma-pch-cross-files.cpp
    A clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-issue-79379.cpp
    M clang/test/SemaCXX/warn-unsafe-buffer-usage-pragma-pch.cpp
    A clang/test/SemaCXX/warn-unsafe-buffer-usage-template-instantiation-notes.cpp

  Log Message:
  -----------
  [-Wunsafe-buffer-usage] Move warning-only analysis back to function-based (#198006)

Move the warning-only analysis back to the end of parsing each Decl.
The warning-only analysis no longer does any extra AST deserialization.
Pre-compiled code will only be analyzed once during its own compilation.
    
When `-fsafe-buffer-usage-suggestions` is used, the behavior is the
same as before, because it requires visibility of the whole
translation unit.
    
rdar://177185295

Also fix rdar://107480207 & rdar://176992568 for the warning-only case.



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