[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread via cfe-commits

https://github.com/DonatNagyE approved this pull request.

(I didn't check all the links, but overall LGTM.)

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread via cfe-commits

https://github.com/DonatNagyE commented:

There are several changes that are only relevant for the users who use alpha 
checkers. Perhaps it would be a good idea to put those into a separate list (or 
to the end of the list?).

Either way, the update looks good to me, thanks for composing it!

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits

steakhal wrote:

I've decided to fix the checker docs for the 
`security.insecureAPI.DeprecatedOrUnsafeBufferHandling`.
It turned out to be an easy one as the only missing function was `fprintf`, so 
it was already well in sync. I bundled that single word change with this PR for 
simplicity.

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits

https://github.com/steakhal updated 
https://github.com/llvm/llvm-project/pull/76446

>From a4a8704644067a7cf81bee601e4898bbc6b9d289 Mon Sep 17 00:00:00 2001
From: Balazs Benics 
Date: Wed, 27 Dec 2023 14:13:08 +0100
Subject: [PATCH 1/5] [analyzer][docs] Update the release notes for llvm-18

---
 clang/docs/ReleaseNotes.rst | 108 +---
 1 file changed, 101 insertions(+), 7 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index ee211c16a48ac8..17b6e285a89ca2 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1052,18 +1052,92 @@ libclang
 Static Analyzer
 ---
 
+- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics
+  of static analysis tools, such as the Clang Static Analyzer.
+  `Documentation 
`__.
+
+- Added a new experimental checker ``alpha.core.StdVariant`` to detect variant
+  accesses via wrong alternatives.
+  (`#66481 `_)
+
+- Added a new experimental checker ``alpha.cplusplus.ArrayDelete`` to detect
+  destructions of arrays of polymorphic objects that are destructed as their
+  base class (`CERT EXP51-CPP 
`_).
+  `Documentation 
`__.
+  (`0e246bb67573 
`_)
+
 - Added a new checker ``core.BitwiseShift`` which reports situations where
   bitwise shift operators produce undefined behavior (because some operand is
   negative or too large).
+  `Documentation 
`__.
+
+- Support "Deducing this" (P0847R7). (Worked out of the box)
+  (`af4751738db8 
`__)
 
 - Move checker ``alpha.unix.Errno`` out of the ``alpha`` package
   to ``unix.Errno``.
+  `Documentation 
`__.
 
 - Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package
   to ``unix.StdCLibraryFunctions``.
 
+- Added a new checker configuration option to
+  ``alpha.security.cert.InvalidPtrChecker``.
+  `Documentation 
`__.
+  (`#67663 `_)
+
+- Move checker ``alpha.security.cert.env.InvalidPtr`` out of the ``alpha``
+  package to ``security.cert.env.InvalidPtr``.
+  `Documentation 
`__.
+
+- Move checker ``alpha.cplusplus.EnumCastOutOfRange`` out of the ``alpha``
+  package to ``optin.core.EnumCastOutOfRange``.
+  `Documentation 
`__.
+
+- Improved the diagnostics of the ``optin.core.EnumCastOutOfRange`` checker.
+  It will display the name and the declaration of the enumeration along with
+  the concrete value being cast to the enum.
+  (`#74503 `_)
+
+- Improved the ``ArrayBoundV2`` checker for detecting buffer accesses prior
+  the buffer; and also reworked the diagnostic messages.
+  (`3e014038b373 
`_,
+  `#70056 `_,
+  `#72107 `_)
+
+- Improved the ``CStringChecker`` checking both ends of the buffers in more 
cases.
+  (`c3a87ddad62a 
`_,
+  `0954dc3fb921 
`_)
+
+- Improved the ``StreamChecker`` by modeling more functions like,
+  ``fflush``, ``fputs``, ``fgetc``, ``fputc``, ``fopen``, ``fopen``, ``fgets``.
+  (`#74296 `_,
+  `#73335 `_,
+  `#72627 `_,
+  `#71518 `_,
+  `#72016 `_,
+  `#70540 `_,
+  `#73638 `_)
+
+- Improved the ``unix.StdCLibraryFunctions`` checker by modeling more 
functions like ``send``, ``recv``, ``readlink`` and ``errno`` behavior.
+  (`52ac71f92d38 
`_,
+  `#71373 `_,

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits

https://github.com/steakhal edited 
https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits

steakhal wrote:

@spaits Could you craft some docs for the experimental std::variant checker?

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits

steakhal wrote:

![image](https://github.com/llvm/llvm-project/assets/6280485/ca01806a-2983-4940-9b99-48da9c50449c)


https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits


@@ -1052,18 +1052,92 @@ libclang
 Static Analyzer
 ---
 
+- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics
+  of static analysis tools, such as the Clang Static Analyzer.
+  `Documentation 
`__.
+
+- Added a new experimental checker ``alpha.core.StdVariant`` to detect variant
+  accesses via wrong alternatives.
+  (`#66481 `_)
+
+- Added a new experimental checker ``alpha.cplusplus.ArrayDelete`` to detect
+  destructions of arrays of polymorphic objects that are destructed as their
+  base class (`CERT EXP51-CPP 
`_).
+  `Documentation 
`__.
+  (`0e246bb67573 
`_)
+
 - Added a new checker ``core.BitwiseShift`` which reports situations where
   bitwise shift operators produce undefined behavior (because some operand is
   negative or too large).
+  `Documentation 
`__.
+
+- Support "Deducing this" (P0847R7). (Worked out of the box)
+  (`af4751738db8 
`__)
 
 - Move checker ``alpha.unix.Errno`` out of the ``alpha`` package
   to ``unix.Errno``.
+  `Documentation 
`__.
 
 - Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package
   to ``unix.StdCLibraryFunctions``.
 
+- Added a new checker configuration option to

steakhal wrote:

Done.

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits

https://github.com/steakhal updated 
https://github.com/llvm/llvm-project/pull/76446

>From a4a8704644067a7cf81bee601e4898bbc6b9d289 Mon Sep 17 00:00:00 2001
From: Balazs Benics 
Date: Wed, 27 Dec 2023 14:13:08 +0100
Subject: [PATCH 1/4] [analyzer][docs] Update the release notes for llvm-18

---
 clang/docs/ReleaseNotes.rst | 108 +---
 1 file changed, 101 insertions(+), 7 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index ee211c16a48ac8..17b6e285a89ca2 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1052,18 +1052,92 @@ libclang
 Static Analyzer
 ---
 
+- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics
+  of static analysis tools, such as the Clang Static Analyzer.
+  `Documentation 
`__.
+
+- Added a new experimental checker ``alpha.core.StdVariant`` to detect variant
+  accesses via wrong alternatives.
+  (`#66481 `_)
+
+- Added a new experimental checker ``alpha.cplusplus.ArrayDelete`` to detect
+  destructions of arrays of polymorphic objects that are destructed as their
+  base class (`CERT EXP51-CPP 
`_).
+  `Documentation 
`__.
+  (`0e246bb67573 
`_)
+
 - Added a new checker ``core.BitwiseShift`` which reports situations where
   bitwise shift operators produce undefined behavior (because some operand is
   negative or too large).
+  `Documentation 
`__.
+
+- Support "Deducing this" (P0847R7). (Worked out of the box)
+  (`af4751738db8 
`__)
 
 - Move checker ``alpha.unix.Errno`` out of the ``alpha`` package
   to ``unix.Errno``.
+  `Documentation 
`__.
 
 - Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package
   to ``unix.StdCLibraryFunctions``.
 
+- Added a new checker configuration option to
+  ``alpha.security.cert.InvalidPtrChecker``.
+  `Documentation 
`__.
+  (`#67663 `_)
+
+- Move checker ``alpha.security.cert.env.InvalidPtr`` out of the ``alpha``
+  package to ``security.cert.env.InvalidPtr``.
+  `Documentation 
`__.
+
+- Move checker ``alpha.cplusplus.EnumCastOutOfRange`` out of the ``alpha``
+  package to ``optin.core.EnumCastOutOfRange``.
+  `Documentation 
`__.
+
+- Improved the diagnostics of the ``optin.core.EnumCastOutOfRange`` checker.
+  It will display the name and the declaration of the enumeration along with
+  the concrete value being cast to the enum.
+  (`#74503 `_)
+
+- Improved the ``ArrayBoundV2`` checker for detecting buffer accesses prior
+  the buffer; and also reworked the diagnostic messages.
+  (`3e014038b373 
`_,
+  `#70056 `_,
+  `#72107 `_)
+
+- Improved the ``CStringChecker`` checking both ends of the buffers in more 
cases.
+  (`c3a87ddad62a 
`_,
+  `0954dc3fb921 
`_)
+
+- Improved the ``StreamChecker`` by modeling more functions like,
+  ``fflush``, ``fputs``, ``fgetc``, ``fputc``, ``fopen``, ``fopen``, ``fgets``.
+  (`#74296 `_,
+  `#73335 `_,
+  `#72627 `_,
+  `#71518 `_,
+  `#72016 `_,
+  `#70540 `_,
+  `#73638 `_)
+
+- Improved the ``unix.StdCLibraryFunctions`` checker by modeling more 
functions like ``send``, ``recv``, ``readlink`` and ``errno`` behavior.
+  (`52ac71f92d38 
`_,
+  `#71373 `_,

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-28 Thread Balazs Benics via cfe-commits


@@ -1072,16 +1146,36 @@ Static Analyzer
   Read the PR for the details.
   (`#66086 `_)
 
+- Other taint-related improvements.
+  (`#66358 `_,
+  `#66074 `_,
+  `#66358 `_)
+
 - A few crashes have been found and fixed using randomized testing related
-  to the use of ``_BitInt()`` in tidy checks and in clang analysis. See
-  `#67212 `_,
+  to the use of ``_BitInt()`` in tidy checks and in clang analysis.
+  (`#67212 `_,
   `#66782 `_,
   `#65889 `_,
-  `#65888 `_, and
-  `#65887 `_
+  `#65888 `_,
+  `#65887 `_)
 
-- Move checker ``alpha.cplusplus.EnumCastOutOfRange`` out of the ``alpha``
-  package to ``optin.core.EnumCastOutOfRange``.
+- Fixed note links of the HTML output.
+  (`#64054 `_)
+
+- Allow widening rage-based for loops.
+  (`#70190 `_)
+
+- Fixed uninitialized base class with initializer list when ctor is not
+  declared in the base class.
+  (`#70464 `_,
+  `#59493 `_,
+  `#54533 `_)
+
+- Added support for the ``cleanup`` attribute.
+  `Documentation 
`__.

steakhal wrote:

My reasoning was to always leave a ref to the relevant change. Possibly, 
including the PR if present to be able to read the discussions.
Given that this release is the only one which is "in transit" from Phabricator 
to the GH PR workflow, PRs are not always present, hence I opted for linking 
the commit.
I wanted to avoid referencing Phabricator revisions, as its being phased out 
AFAIK.

The PR/change is helpful for the users to see concrete diffs/examples how test 
code was changed, or how certain flags were used. I figured, its not too 
intrusive, so I opted-in for those.

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits

https://github.com/Xazax-hun edited 
https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits


@@ -1052,18 +1052,92 @@ libclang
 Static Analyzer
 ---
 
+- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics
+  of static analysis tools, such as the Clang Static Analyzer.
+  `Documentation 
`__.
+
+- Added a new experimental checker ``alpha.core.StdVariant`` to detect variant
+  accesses via wrong alternatives.
+  (`#66481 `_)
+
+- Added a new experimental checker ``alpha.cplusplus.ArrayDelete`` to detect
+  destructions of arrays of polymorphic objects that are destructed as their
+  base class (`CERT EXP51-CPP 
`_).
+  `Documentation 
`__.
+  (`0e246bb67573 
`_)
+
 - Added a new checker ``core.BitwiseShift`` which reports situations where
   bitwise shift operators produce undefined behavior (because some operand is
   negative or too large).
+  `Documentation 
`__.
+
+- Support "Deducing this" (P0847R7). (Worked out of the box)
+  (`af4751738db8 
`__)
 
 - Move checker ``alpha.unix.Errno`` out of the ``alpha`` package
   to ``unix.Errno``.
+  `Documentation 
`__.
 
 - Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package
   to ``unix.StdCLibraryFunctions``.
 
+- Added a new checker configuration option to

Xazax-hun wrote:

Maybe we want to have a short sentence about what the configuration option is 
doing?

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits


@@ -1072,16 +1146,36 @@ Static Analyzer
   Read the PR for the details.
   (`#66086 `_)
 
+- Other taint-related improvements.
+  (`#66358 `_,
+  `#66074 `_,
+  `#66358 `_)
+
 - A few crashes have been found and fixed using randomized testing related
-  to the use of ``_BitInt()`` in tidy checks and in clang analysis. See
-  `#67212 `_,
+  to the use of ``_BitInt()`` in tidy checks and in clang analysis.
+  (`#67212 `_,
   `#66782 `_,
   `#65889 `_,
-  `#65888 `_, and
-  `#65887 `_
+  `#65888 `_,
+  `#65887 `_)
 
-- Move checker ``alpha.cplusplus.EnumCastOutOfRange`` out of the ``alpha``
-  package to ``optin.core.EnumCastOutOfRange``.
+- Fixed note links of the HTML output.
+  (`#64054 `_)
+
+- Allow widening rage-based for loops.
+  (`#70190 `_)
+
+- Fixed uninitialized base class with initializer list when ctor is not
+  declared in the base class.
+  (`#70464 `_,
+  `#59493 `_,
+  `#54533 `_)
+
+- Added support for the ``cleanup`` attribute.
+  `Documentation 
`__.

Xazax-hun wrote:

In some cases, we link to the PR/commit, in other cases only to the 
documentation. I am OK with this, I was only wondering whether we want to add 
links to the commits everywhere. Feel free to ignore.

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Gábor Horváth via cfe-commits

https://github.com/Xazax-hun approved this pull request.


https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Balazs Benics via cfe-commits

steakhal wrote:

The `docs-clang-html` build target produces the following html document at 
`tools/clang/docs/html/ReleaseNotes.html#static-analyzer`, without any warnings:
![image](https://github.com/llvm/llvm-project/assets/6280485/3c90c648-ba56-476d-8ba2-0e1d2ba8402a)

https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Balazs Benics via cfe-commits

https://github.com/steakhal edited 
https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang-static-analyzer-1

Author: Balazs Benics (steakhal)


Changes

This PR prepares the release notes of the Clang Static Analyzer for the llvm-18 
release branch, due in about a week.
See the regular [release 
schedule](https://llvm.org/docs/HowToReleaseLLVM.html#annual-release-schedule).

This patch was written after examining the relevant Static Analyzer commits 
since the last release.
Have a look at the commits, and provide feedback if I missed anything 
interesting.
Note that the release notes is not meant to be an exhaustive list of the 
changes, but rather a curated list of the relevant changes that might interest 
our stakeholders, such as tool vendors based on top of CSA or users with custom 
checkers.

See the relevant commits by using this command:
```
git log --oneline llvmorg-18-init..llvm/main   
clang/{lib/StaticAnalyzer,include/clang/StaticAnalyzer} | grep -v NFC | grep -v 
-i revert
```

Tasks to do before llvm-18 branches off:

We need to adjust/add documentation after the following PRs, to the 
`clang/docs/analyzer/checkers.rst`:

 - [ ] #73247: The list in the docs is incomplete. We need to check and 
update it.
 - [ ] #66481: The `StdVariant` alpha checker experimental, but we 
should still have some documentation for it. Now its completely absent.

---
Full diff: https://github.com/llvm/llvm-project/pull/76446.diff


1 Files Affected:

- (modified) clang/docs/ReleaseNotes.rst (+101-7) 


``diff
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index ee211c16a48ac8..17b6e285a89ca2 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1052,18 +1052,92 @@ libclang
 Static Analyzer
 ---
 
+- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics
+  of static analysis tools, such as the Clang Static Analyzer.
+  `Documentation 
`__.
+
+- Added a new experimental checker ``alpha.core.StdVariant`` to detect variant
+  accesses via wrong alternatives.
+  (`#66481 `_)
+
+- Added a new experimental checker ``alpha.cplusplus.ArrayDelete`` to detect
+  destructions of arrays of polymorphic objects that are destructed as their
+  base class (`CERT EXP51-CPP 
`_).
+  `Documentation 
`__.
+  (`0e246bb67573 
`_)
+
 - Added a new checker ``core.BitwiseShift`` which reports situations where
   bitwise shift operators produce undefined behavior (because some operand is
   negative or too large).
+  `Documentation 
`__.
+
+- Support "Deducing this" (P0847R7). (Worked out of the box)
+  (`af4751738db8 
`__)
 
 - Move checker ``alpha.unix.Errno`` out of the ``alpha`` package
   to ``unix.Errno``.
+  `Documentation 
`__.
 
 - Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package
   to ``unix.StdCLibraryFunctions``.
 
+- Added a new checker configuration option to
+  ``alpha.security.cert.InvalidPtrChecker``.
+  `Documentation 
`__.
+  (`#67663 `_)
+
+- Move checker ``alpha.security.cert.env.InvalidPtr`` out of the ``alpha``
+  package to ``security.cert.env.InvalidPtr``.
+  `Documentation 
`__.
+
+- Move checker ``alpha.cplusplus.EnumCastOutOfRange`` out of the ``alpha``
+  package to ``optin.core.EnumCastOutOfRange``.
+  `Documentation 
`__.
+
+- Improved the diagnostics of the ``optin.core.EnumCastOutOfRange`` checker.
+  It will display the name and the declaration of the enumeration along with
+  the concrete value being cast to the enum.
+  (`#74503 `_)
+
+- Improved the ``ArrayBoundV2`` checker for detecting buffer accesses prior
+  the buffer; and also reworked the diagnostic messages.
+  (`3e014038b373 
`_,
+  `#70056 `_,
+  `#72107 `_)
+
+- Improved the ``CStringChecker`` checking both ends of the buffers in more 
cases.
+  (`c3a87ddad62a 

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Balazs Benics via cfe-commits

https://github.com/steakhal created 
https://github.com/llvm/llvm-project/pull/76446

This PR prepares the release notes of the Clang Static Analyzer for the llvm-18 
release branch, due in about a week.
See the regular [release 
schedule](https://llvm.org/docs/HowToReleaseLLVM.html#annual-release-schedule).

This patch was written after examining the relevant Static Analyzer commits 
since the last release.
Have a look at the commits, and provide feedback if I missed anything 
interesting.
Note that the release notes is not meant to be an exhaustive list of the 
changes, but rather a curated list of the relevant changes that might interest 
our stakeholders, such as tool vendors based on top of CSA or users with custom 
checkers.

See the relevant commits by using this command:
```
git log --oneline llvmorg-18-init..llvm/main   
clang/{lib/StaticAnalyzer,include/clang/StaticAnalyzer} | grep -v NFC | grep -v 
-i revert
```

Tasks to do before llvm-18 branches off:

We need to adjust/add documentation after the following PRs, to the 
`clang/docs/analyzer/checkers.rst`:

 - [ ] #73247: The list in the docs is incomplete. We need to check and update 
it.
 - [ ] #66481: The `StdVariant` alpha checker experimental, but we should still 
have some documentation for it. Now its completely absent.

>From a4a8704644067a7cf81bee601e4898bbc6b9d289 Mon Sep 17 00:00:00 2001
From: Balazs Benics 
Date: Wed, 27 Dec 2023 14:13:08 +0100
Subject: [PATCH] [analyzer][docs] Update the release notes for llvm-18

---
 clang/docs/ReleaseNotes.rst | 108 +---
 1 file changed, 101 insertions(+), 7 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index ee211c16a48ac8..17b6e285a89ca2 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -1052,18 +1052,92 @@ libclang
 Static Analyzer
 ---
 
+- Implemented the ``[[clang::suppress]]`` attribute for suppressing diagnostics
+  of static analysis tools, such as the Clang Static Analyzer.
+  `Documentation 
`__.
+
+- Added a new experimental checker ``alpha.core.StdVariant`` to detect variant
+  accesses via wrong alternatives.
+  (`#66481 `_)
+
+- Added a new experimental checker ``alpha.cplusplus.ArrayDelete`` to detect
+  destructions of arrays of polymorphic objects that are destructed as their
+  base class (`CERT EXP51-CPP 
`_).
+  `Documentation 
`__.
+  (`0e246bb67573 
`_)
+
 - Added a new checker ``core.BitwiseShift`` which reports situations where
   bitwise shift operators produce undefined behavior (because some operand is
   negative or too large).
+  `Documentation 
`__.
+
+- Support "Deducing this" (P0847R7). (Worked out of the box)
+  (`af4751738db8 
`__)
 
 - Move checker ``alpha.unix.Errno`` out of the ``alpha`` package
   to ``unix.Errno``.
+  `Documentation 
`__.
 
 - Move checker ``alpha.unix.StdCLibraryFunctions`` out of the ``alpha`` package
   to ``unix.StdCLibraryFunctions``.
 
+- Added a new checker configuration option to
+  ``alpha.security.cert.InvalidPtrChecker``.
+  `Documentation 
`__.
+  (`#67663 `_)
+
+- Move checker ``alpha.security.cert.env.InvalidPtr`` out of the ``alpha``
+  package to ``security.cert.env.InvalidPtr``.
+  `Documentation 
`__.
+
+- Move checker ``alpha.cplusplus.EnumCastOutOfRange`` out of the ``alpha``
+  package to ``optin.core.EnumCastOutOfRange``.
+  `Documentation 
`__.
+
+- Improved the diagnostics of the ``optin.core.EnumCastOutOfRange`` checker.
+  It will display the name and the declaration of the enumeration along with
+  the concrete value being cast to the enum.
+  (`#74503 `_)
+
+- Improved the ``ArrayBoundV2`` checker for detecting buffer accesses prior
+  the buffer; and also reworked the diagnostic messages.
+  (`3e014038b373 
`_,
+  `#70056 `_,
+  `#72107 `_)

[clang] [analyzer][docs] Update the release notes for llvm-18 (PR #76446)

2023-12-27 Thread Balazs Benics via cfe-commits

https://github.com/steakhal milestoned 
https://github.com/llvm/llvm-project/pull/76446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits