From ad48e9669a80e05c55e35970461b34f04dc0f117 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Thu, 5 Jan 2023 16:29:09 -0500 Subject: [PATCH] [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 --- clang/include/clang/Basic/AttrDocs.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 2dc5e7d61817..6d7a3ffd2d52 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: