aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
diff options
context:
space:
mode:
authorDonĂ¡t Nagy <donat.nagy@ericsson.com>2024-06-12 14:26:47 +0200
committerGitHub <noreply@github.com>2024-06-12 14:26:47 +0200
commitd9a508db55f986518983aaba18c1b7f9ce67536a (patch)
treec2fc843cee6858c972ef2c83e96f54d12a19891a /clang/docs
parent3c9a9c736532ea1ed997aae069c516b2564c3235 (diff)
downloadllvm-d9a508db55f986518983aaba18c1b7f9ce67536a.zip
llvm-d9a508db55f986518983aaba18c1b7f9ce67536a.tar.gz
llvm-d9a508db55f986518983aaba18c1b7f9ce67536a.tar.bz2
[analyzer] Finish moving alpha.core.SizeofPtr to clang-tidy (#95118)
The checker `alpha.core.SizeofPtr` was a very simple checker that did not rely on path sensitive analysis and was very similar to the (more complex and refined) clang-tidy check `bugprone-sizeof-expression`. As there is no reason to maintain two separate implementations for the same goal (and clang-tidy is more lightweight and accessible than the Analyzer) I decided to move this functionality from the Static Analyzer to clang-tidy. Recently my commit 546c816a529835a4cf89deecff957ea336a94fa2 reimplemented the advantageous parts of `alpha.core.SizeofPtr` within clang-tidy; now this commit finishes the transfer by deleting `alpha.core.SizeofPtr`.
Diffstat (limited to 'clang/docs')
-rw-r--r--clang/docs/analyzer/checkers.rst15
1 files changed, 0 insertions, 15 deletions
diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst
index f53dd54..d76ee24 100644
--- a/clang/docs/analyzer/checkers.rst
+++ b/clang/docs/analyzer/checkers.rst
@@ -2452,21 +2452,6 @@ Check for pointer subtractions on two pointers pointing to different memory chun
int d = &y - &x; // warn
}
-.. _alpha-core-SizeofPtr:
-
-alpha.core.SizeofPtr (C)
-""""""""""""""""""""""""
-Warn about unintended use of ``sizeof()`` on pointer expressions.
-
-.. code-block:: c
-
- struct s {};
-
- int test(struct s *p) {
- return sizeof(p);
- // warn: sizeof(ptr) can produce an unexpected result
- }
-
.. _alpha-core-StackAddressAsyncEscape:
alpha.core.StackAddressAsyncEscape (C)