[all-commits] [llvm/llvm-project] fc4b09: [analyzer] Add an ownership change visitor to Stre...

Kristóf Umann via All-commits all-commits at lists.llvm.org
Mon Jun 24 07:34:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fc4b09d16139348533f1a1c9c72c99dacba51417
      https://github.com/llvm/llvm-project/commit/fc4b09d16139348533f1a1c9c72c99dacba51417
  Author: Kristóf Umann <dkszelethus at gmail.com>
  Date:   2024-06-24 (Mon, 24 Jun 2024)

  Changed paths:
    M clang/lib/StaticAnalyzer/Checkers/NoOwnershipChangeVisitor.cpp
    M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
    A clang/test/Analysis/stream-notes-missing-close.cpp

  Log Message:
  -----------
  [analyzer] Add an ownership change visitor to StreamChecker (#94957)

This is very similar to https://reviews.llvm.org/D105553, in fact, I
barely made any changes from MallocChecker's ownership visitor to this
one.

The new visitor emits a diagnostic note for function where a change in
stream ownership was expected (for example, it had a fclose() call), but
the ownership remained unchanged. This is similar to messages regarding
ordinary values ("Returning without writing to x").



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