r349776 - Correct the diagnose_if attribute documentation. Fixes PR35845.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 20 09:28:32 PST 2018


Author: aaronballman
Date: Thu Dec 20 09:28:32 2018
New Revision: 349776

URL: http://llvm.org/viewvc/llvm-project?rev=349776&view=rev
Log:
Correct the diagnose_if attribute documentation. Fixes PR35845.

Modified:
    cfe/trunk/include/clang/Basic/AttrDocs.td

Modified: cfe/trunk/include/clang/Basic/AttrDocs.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=349776&r1=349775&r2=349776&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/AttrDocs.td (original)
+++ cfe/trunk/include/clang/Basic/AttrDocs.td Thu Dec 20 09:28:32 2018
@@ -554,9 +554,9 @@ certain user-defined criteria. For examp
 
 .. 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




More information about the cfe-commits mailing list