[clang] 96ad7ef - [NFC][analyzer] Correct example code in VirtualCall docs (#131992)

via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 19 03:00:31 PDT 2025


Author: Donát Nagy
Date: 2025-03-19T11:00:28+01:00
New Revision: 96ad7ef77655362dd818fda4685c14776fe5dbf3

URL: https://github.com/llvm/llvm-project/commit/96ad7ef77655362dd818fda4685c14776fe5dbf3
DIFF: https://github.com/llvm/llvm-project/commit/96ad7ef77655362dd818fda4685c14776fe5dbf3.diff

LOG: [NFC][analyzer] Correct example code in VirtualCall docs (#131992)

Oops, I noticed these just after merging my commit
9762b8e1757601a719d926f7df77c207617adfdd.

Added: 
    

Modified: 
    clang/docs/analyzer/checkers.rst

Removed: 
    


################################################################################
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