]> granicus.if.org Git - clang/commitdiff
Correct the diagnose_if attribute documentation. Fixes PR35845.
authorAaron Ballman <aaron@aaronballman.com>
Thu, 20 Dec 2018 17:28:32 +0000 (17:28 +0000)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 20 Dec 2018 17:28:32 +0000 (17:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349776 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/AttrDocs.td

index 5dc9a05f4e5f2de07793ca2f13d88b2483eafb1d..9017a631f77d5c0c02a0888216adedfda8de2a68 100644 (file)
@@ -554,9 +554,9 @@ certain user-defined criteria. For example:
 
 .. code-block:: c
 
-  void abs(int a)
+  int abs(int a)
     __attribute__((diagnose_if(a >= 0, "Redundant abs call", "warning")));
-  void must_abs(int a)
+  int must_abs(int a)
     __attribute__((diagnose_if(a >= 0, "Redundant abs call", "error")));
 
   int val = abs(1); // warning: Redundant abs call