[clang] [NFC][analyzer] Correct example code in VirtualCall docs (PR #131992)
Donát Nagy via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 19 03:00:13 PDT 2025
https://github.com/NagyDonat created https://github.com/llvm/llvm-project/pull/131992
Oops, I noticed these just after merging my commit 9762b8e1757601a719d926f7df77c207617adfdd.
>From 390cadac0d98d90a802cf3520a4891e39953eead Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Don=C3=A1t=20Nagy?= <donat.nagy at ericsson.com>
Date: Wed, 19 Mar 2025 10:57:56 +0100
Subject: [PATCH] [NFC][analyzer] Correct example code in VirtualCall docs
Oops, I noticed these just after merging my commit
9762b8e1757601a719d926f7df77c207617adfdd.
---
clang/docs/analyzer/checkers.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/docs/analyzer/checkers.rst b/clang/docs/analyzer/checkers.rst
index f3243d002bd35..925f326730d4d 100644
--- a/clang/docs/analyzer/checkers.rst
+++ b/clang/docs/analyzer/checkers.rst
@@ -563,7 +563,7 @@ pure virtual – but may be still surprising for the programmer.)
.. code-block:: cpp
struct A {
- virtual void getKind() = 0;
+ virtual int getKind() = 0;
A() {
// warn: This calls the pure virtual method A::getKind().
@@ -888,7 +888,7 @@ checker does not report them**.
.. code-block:: cpp
struct A {
- virtual void getKind();
+ virtual int getKind();
A() {
// warn: This calls A::getKind() even if we are constructing an instance
More information about the cfe-commits
mailing list