nickdesaulniers created this revision.
nickdesaulniers added a reviewer: rsmith.
Herald added a subscriber: cfe-commits.

This wasn't documented https://clang.llvm.org/docs/AttributeReference.html, and 
briefly mentioned 
https://clang.llvm.org/docs/UsersManual.html#differences-between-various-standard-modes.


Repository:
  rC Clang

https://reviews.llvm.org/D51190

Files:
  include/clang/Basic/AttrDocs.td


Index: include/clang/Basic/AttrDocs.td
===================================================================
--- include/clang/Basic/AttrDocs.td
+++ include/clang/Basic/AttrDocs.td
@@ -3505,3 +3505,19 @@
 invoking clang with -fno-c++-static-destructors.
   }];
 }
+
+def GnuInlineDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+The ``gnu_inline`` attribute specifies that a function marked ``inline`` should
+follow the c89 convention that if the function cannot be inlined (possibly due
+to being referred to by function pointer), then no out of line definition will
+be emitted (instead of c99's behaviour of always emitting an out of line
+definition). If ``__GNUC_STDC_INLINE__`` is defined, then the current
+translation unit is not being compiled with ``gnu_inline`` semantics, and the
+``gnu_inline`` function attribute can be used to get c89 semantics on a per
+function basis.  If ``__GNUC_STDC_INLINE__`` is not defined, then the
+translation unit is already being compiled with c89 semantics as the implied
+default.
+  }];
+}


Index: include/clang/Basic/AttrDocs.td
===================================================================
--- include/clang/Basic/AttrDocs.td
+++ include/clang/Basic/AttrDocs.td
@@ -3505,3 +3505,19 @@
 invoking clang with -fno-c++-static-destructors.
   }];
 }
+
+def GnuInlineDocs : Documentation {
+  let Category = DocCatFunction;
+  let Content = [{
+The ``gnu_inline`` attribute specifies that a function marked ``inline`` should
+follow the c89 convention that if the function cannot be inlined (possibly due
+to being referred to by function pointer), then no out of line definition will
+be emitted (instead of c99's behaviour of always emitting an out of line
+definition). If ``__GNUC_STDC_INLINE__`` is defined, then the current
+translation unit is not being compiled with ``gnu_inline`` semantics, and the
+``gnu_inline`` function attribute can be used to get c89 semantics on a per
+function basis.  If ``__GNUC_STDC_INLINE__`` is not defined, then the
+translation unit is already being compiled with c89 semantics as the implied
+default.
+  }];
+}
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to