<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/Analysis/analyze-function-guide.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[analyzer] Fix -analyze-function debug warning to account for syntax checkers (#161664)</title>
<updated>2025-10-03T14:32:52+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>benicsbalazs@gmail.com</email>
</author>
<published>2025-10-03T14:32:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c75ae01233b0965d48e3770160119c162eb5c2ee'/>
<id>c75ae01233b0965d48e3770160119c162eb5c2ee</id>
<content type='text'>
Previously, when using `-analyze-function` to target a specific
function, the analyzer would incorrectly report "Every top-level
function was skipped" even when the function was successfully analyzed
by syntax-only checkers.

This happened because `NumFunctionsAnalyzed` only counted path-sensitive
analysis, not syntax-only analysis. The misuse detection logic would see
0 functions analyzed and incorrectly conclude the function wasn't found.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, when using `-analyze-function` to target a specific
function, the analyzer would incorrectly report "Every top-level
function was skipped" even when the function was successfully analyzed
by syntax-only checkers.

This happened because `NumFunctionsAnalyzed` only counted path-sensitive
analysis, not syntax-only analysis. The misuse detection logic would see
0 functions analyzed and incorrectly conclude the function wasn't found.</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Remove breaking RUN line in the test case</title>
<updated>2022-02-16T09:56:18+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-02-16T09:56:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4642c640f4ef76b7e98420c98b7391f069293838'/>
<id>4642c640f4ef76b7e98420c98b7391f069293838</id>
<content type='text'>
This is a followup for D118690.
I'm removing the offending RUN line, to resolve the build breakage:

https://lab.llvm.org/buildbot/#/builders/91/builds/3975/steps/8/logs/stdio

Exit Code: 1
Command Output (stderr):
--
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/clang/test/Analysis/analyze-function-guide.cpp:58:22:
error: CHECK-EMPTY2-NOT: excluded string found in input
// CHECK-EMPTY2-NOT: Every top-level function was skipped.
                     ^
&lt;stdin&gt;:1:1: note: found here
Every top-level function was skipped.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D118690
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup for D118690.
I'm removing the offending RUN line, to resolve the build breakage:

https://lab.llvm.org/buildbot/#/builders/91/builds/3975/steps/8/logs/stdio

Exit Code: 1
Command Output (stderr):
--
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/clang/test/Analysis/analyze-function-guide.cpp:58:22:
error: CHECK-EMPTY2-NOT: excluded string found in input
// CHECK-EMPTY2-NOT: Every top-level function was skipped.
                     ^
&lt;stdin&gt;:1:1: note: found here
Every top-level function was skipped.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://reviews.llvm.org/D118690
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Revert "[analyzer] Prevent misuses of -analyze-function""</title>
<updated>2022-02-16T09:33:21+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-02-16T09:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b3c0014e5a7530645f502d8b19ef1df313cc85b9'/>
<id>b3c0014e5a7530645f502d8b19ef1df313cc85b9</id>
<content type='text'>
This reverts commit 620d99b7edc64ee87b1ce209f179305e6a919006.

Let's see if removing the two offending RUN lines makes this patch pass.
Not ideal to drop tests but, it's just a debugging feature, probably not
that important.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 620d99b7edc64ee87b1ce209f179305e6a919006.

Let's see if removing the two offending RUN lines makes this patch pass.
Not ideal to drop tests but, it's just a debugging feature, probably not
that important.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[analyzer] Prevent misuses of -analyze-function"</title>
<updated>2022-02-08T16:42:46+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-02-08T16:42:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=620d99b7edc64ee87b1ce209f179305e6a919006'/>
<id>620d99b7edc64ee87b1ce209f179305e6a919006</id>
<content type='text'>
This reverts commit 841817b1ed26c1fbb709957d54c0e2751624fbf8.

Ah, it still fails on build bots for some reason.
Pinning the target triple was not enough.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 841817b1ed26c1fbb709957d54c0e2751624fbf8.

Ah, it still fails on build bots for some reason.
Pinning the target triple was not enough.
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Prevent misuses of -analyze-function</title>
<updated>2022-02-08T16:27:57+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-02-08T16:27:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=841817b1ed26c1fbb709957d54c0e2751624fbf8'/>
<id>841817b1ed26c1fbb709957d54c0e2751624fbf8</id>
<content type='text'>
Sometimes when I pass the mentioned option I forget about passing the
parameter list for c++ sources.
It would be also useful newcomers to learn about this.

This patch introduces some logic checking common misuses involving
`-analyze-function`.

Reviewed-By: martong

Differential Revision: https://reviews.llvm.org/D118690
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes when I pass the mentioned option I forget about passing the
parameter list for c++ sources.
It would be also useful newcomers to learn about this.

This patch introduces some logic checking common misuses involving
`-analyze-function`.

Reviewed-By: martong

Differential Revision: https://reviews.llvm.org/D118690
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "[analyzer] Prevent misuses of -analyze-function"</title>
<updated>2022-02-02T10:44:27+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-02-02T10:44:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e99abc5d8a3a730915933e9725fe585a46f51b18'/>
<id>e99abc5d8a3a730915933e9725fe585a46f51b18</id>
<content type='text'>
This reverts commit 9d6a6159730171bc0faf78d7f109d6543f4c93c2.

Exit Code: 1

Command Output (stderr):
--
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/clang/test/Analysis/analyze-function-guide.cpp:53:21: error: CHECK-EMPTY-NOT: excluded string found in input // CHECK-EMPTY-NOT: Every top-level function was skipped.
                    ^
&lt;stdin&gt;:1:1: note: found here
Every top-level function was skipped.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Input file: &lt;stdin&gt;
Check file: /scratch/buildbot/bothome/clang-ve-ninja/llvm-project/clang/test/Analysis/analyze-function-guide.cpp

-dump-input=help explains the following input dump.

Input was:
&lt;&lt;&lt;&lt;&lt;&lt;
        1: Every top-level function was skipped.
not:53     !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: no match expected
        2: Pass the -analyzer-display-progress for tracking which functions are analyzed.
&gt;&gt;&gt;&gt;&gt;&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9d6a6159730171bc0faf78d7f109d6543f4c93c2.

Exit Code: 1

Command Output (stderr):
--
/scratch/buildbot/bothome/clang-ve-ninja/llvm-project/clang/test/Analysis/analyze-function-guide.cpp:53:21: error: CHECK-EMPTY-NOT: excluded string found in input // CHECK-EMPTY-NOT: Every top-level function was skipped.
                    ^
&lt;stdin&gt;:1:1: note: found here
Every top-level function was skipped.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Input file: &lt;stdin&gt;
Check file: /scratch/buildbot/bothome/clang-ve-ninja/llvm-project/clang/test/Analysis/analyze-function-guide.cpp

-dump-input=help explains the following input dump.

Input was:
&lt;&lt;&lt;&lt;&lt;&lt;
        1: Every top-level function was skipped.
not:53     !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: no match expected
        2: Pass the -analyzer-display-progress for tracking which functions are analyzed.
&gt;&gt;&gt;&gt;&gt;&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[analyzer] Prevent misuses of -analyze-function</title>
<updated>2022-02-02T10:31:22+00:00</updated>
<author>
<name>Balazs Benics</name>
<email>balazs.benics@sigmatechnology.se</email>
</author>
<published>2022-02-02T10:31:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=9d6a6159730171bc0faf78d7f109d6543f4c93c2'/>
<id>9d6a6159730171bc0faf78d7f109d6543f4c93c2</id>
<content type='text'>
Sometimes when I pass the mentioned option I forget about passing the
parameter list for c++ sources.
It would be also useful newcomers to learn about this.

This patch introduces some logic checking common misuses involving
`-analyze-function`.

Reviewed-By: martong

Differential Revision: https://reviews.llvm.org/D118690
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes when I pass the mentioned option I forget about passing the
parameter list for c++ sources.
It would be also useful newcomers to learn about this.

This patch introduces some logic checking common misuses involving
`-analyze-function`.

Reviewed-By: martong

Differential Revision: https://reviews.llvm.org/D118690
</pre>
</div>
</content>
</entry>
</feed>
