[PATCH] D68410: [AttrDocs] document always_inline
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 4 15:35:36 PST 2020
nickdesaulniers updated this revision to Diff 309682.
nickdesaulniers marked an inline comment as done.
nickdesaulniers added a comment.
- rebased, s/Inline/Inlining/
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68410/new/
https://reviews.llvm.org/D68410
Files:
clang/include/clang/Basic/Attr.td
clang/include/clang/Basic/AttrDocs.td
Index: clang/include/clang/Basic/AttrDocs.td
===================================================================
--- clang/include/clang/Basic/AttrDocs.td
+++ clang/include/clang/Basic/AttrDocs.td
@@ -5486,3 +5486,22 @@
<https://developer.arm.com/docs/ecm0359818/latest/>`_ for more information.
}];
}
+
+def AlwaysInlineDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+Inlining heuristics are disabled and inlining is always attempted regardless of
+optimization level.
+
+Does not guarantee that inline substitution actually occurs.
+
+See also `the MSDN Inline docs`_, `the GCC Common Function Attribute docs`_,
+and `the GCC Inline docs`_.
+
+.. _the MSDN Inline docs: https://docs.microsoft.com/en-us/cpp/cpp/inline-functions-cpp
+.. _the GCC Common Function Attribute docs: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html
+.. _the GCC Inline docs: https://gcc.gnu.org/onlinedocs/gcc/Inline.html
+
+}];
+ let Heading = "always_inline, __force_inline";
+}
Index: clang/include/clang/Basic/Attr.td
===================================================================
--- clang/include/clang/Basic/Attr.td
+++ clang/include/clang/Basic/Attr.td
@@ -678,7 +678,7 @@
def AlwaysInline : InheritableAttr {
let Spellings = [GCC<"always_inline">, Keyword<"__forceinline">];
let Subjects = SubjectList<[Function]>;
- let Documentation = [Undocumented];
+ let Documentation = [AlwaysInlineDocs];
}
def Artificial : InheritableAttr {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68410.309682.patch
Type: text/x-patch
Size: 1492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201204/1aa88b6c/attachment-0001.bin>
More information about the cfe-commits
mailing list