summaryrefslogtreecommitdiff
path: root/clang/test/Analysis/analyze-function-guide.cpp
AgeCommit message (Collapse)Author
2025-10-03[analyzer] Fix -analyze-function debug warning to account for syntax ↵Balazs Benics
checkers (#161664) 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.
2022-02-16[analyzer] Remove breaking RUN line in the test caseBalazs Benics
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. ^ <stdin>:1:1: note: found here Every top-level function was skipped. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Differential Revision: https://reviews.llvm.org/D118690
2022-02-16Revert "Revert "[analyzer] Prevent misuses of -analyze-function""Balazs Benics
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.
2022-02-08Revert "[analyzer] Prevent misuses of -analyze-function"Balazs Benics
This reverts commit 841817b1ed26c1fbb709957d54c0e2751624fbf8. Ah, it still fails on build bots for some reason. Pinning the target triple was not enough.
2022-02-08[analyzer] Prevent misuses of -analyze-functionBalazs Benics
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
2022-02-02Revert "[analyzer] Prevent misuses of -analyze-function"Balazs Benics
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. ^ <stdin>:1:1: note: found here Every top-level function was skipped. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Input file: <stdin> 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: <<<<<< 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. >>>>>>
2022-02-02[analyzer] Prevent misuses of -analyze-functionBalazs Benics
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