[all-commits] [llvm/llvm-project] ccd160: Diagnose misuse of the cleanup attribute (#80040)

Bhuminjay Soni via All-commits all-commits at lists.llvm.org
Wed Mar 13 09:28:47 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ccd16085f70105d457f052543d731dd51089945b
      https://github.com/llvm/llvm-project/commit/ccd16085f70105d457f052543d731dd51089945b
  Author: Bhuminjay Soni <Soni5Happy at gmail.com>
  Date:   2024-03-13 (Wed, 13 Mar 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    M clang/lib/Sema/SemaDeclAttr.cpp
    M clang/test/Sema/attr-cleanup.c

  Log Message:
  -----------
  Diagnose misuse of the cleanup attribute (#80040)

This pull request fixes #79443 when the cleanup attribute is intended to
be applied to a variable declaration, passing its address to a specified
function. The problem arises when standard functions like free,
closedir, fclose, etc., are used incorrectly with this attribute,
leading to incorrect behavior.

Fixes #79443



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