[clang] ad48e96 - [NFC] [Doc] Fix example for AnnotateTypeDocs

Xiang Li via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 5 13:32:31 PST 2023


Author: Xiang Li
Date: 2023-01-05T16:32:02-05:00
New Revision: ad48e9669a80e05c55e35970461b34f04dc0f117

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

LOG: [NFC] [Doc] Fix example for AnnotateTypeDocs

Change clang::annotate into clang::annotate_type.

The example will get error like
error: 'annotate' attribute cannot be applied to types
int* [[clang::annotate("category1", "foo", 1)]] f(int[[clang::annotate("category2")]] *);

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D139935

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td
index 2dc5e7d61817a..6d7a3ffd2d52c 100644
--- a/clang/include/clang/Basic/AttrDocs.td
+++ b/clang/include/clang/Basic/AttrDocs.td
@@ -6705,7 +6705,7 @@ For example:
 
 .. code-block:: c++
 
-  int* [[clang::annotate("category1", "foo", 1)]] f(int[[clang::annotate("category2")]] *);
+  int* [[clang::annotate_type("category1", "foo", 1)]] f(int[[clang::annotate_type("category2")]] *);
 
 The attribute does not have any effect on the semantics of the type system,
 neither type checking rules, nor runtime semantics. In particular:


        


More information about the cfe-commits mailing list