aaron.ballman added inline comments.

================
Comment at: include/clang/Basic/AttrDocs.td:3154
+
+def SelectAnyDocs : Documentation {
+   let Content = [{This attribute makes global symbol have a weak definition
----------------
aaron.ballman wrote:
> majnemer wrote:
> > aaron.ballman wrote:
> > > Prazek wrote:
> > > > aaron.ballman wrote:
> > > > > Prazek wrote:
> > > > > > aaron.ballman wrote:
> > > > > > > I think you need to set the `Category` as well.
> > > > > > > 
> > > > > > > To test this you should run something like (replacing <root> and 
> > > > > > > fixing up path separators as needed):
> > > > > > > ```
> > > > > > > clang-tblgen -gen-attr-docs -I <root>\llvm\tools\clang\include 
> > > > > > > <root>\llvm\tools\clang\include\clang\Basic\Attr.td -o 
> > > > > > > <root>\llvm\tools\clang\docs\AttributeReference.rst
> > > > > > > ```
> > > > > > Thanks for the testing command. Should I do anything in order to 
> > > > > > check if docs build?
> > > > > > I enabled docs with -DLLVM_BUILD_DOCS=ON, and I have sphinx. 
> > > > > > Everything builds, but I don't see docs anywhere.
> > > > > > 
> > > > > > the docs looks like this:
> > > > > > +selectany (gnu::selectany)
> > > > > > +--------------------------
> > > > > > +.. csv-table:: Supported Syntaxes
> > > > > > +   :header: "GNU", "C++11", "__declspec", "Keyword", "Pragma", 
> > > > > > "Pragma clang attribute"
> > > > > > +
> > > > > > +   "X","X","X","", "", ""
> > > > > > +
> > > > > > +This attribute appertains to a global symbol, causing it to have a 
> > > > > > weak
> > > > > > +definition (
> > > > > > +.. _`linkonce`: https://llvm.org/docs/LangRef.html#linkage-types
> > > > > > +), allowing the linker to select any definition.
> > > > > > +
> > > > > > +For more information see
> > > > > > +.. `gcc documentation`: 
> > > > > > https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Microsoft-Windows-Variable-Attributes.html
> > > > > > +
> > > > > > Thanks for the testing command. Should I do anything in order to 
> > > > > > check if docs build?
> > > > > 
> > > > > On Windows, I use `make html` within the clang\docs directory to 
> > > > > generate the actual sphinx docs -- that will tell you if there are 
> > > > > sphinx issues. Be sure you do *not* commit the AttributeReference.rst 
> > > > > file that it generates, however.
> > > > I tried building docs but it doesn't seem that there is any target like 
> > > > "html". Do you know if there is documentation on how to build docs? I 
> > > > couldn't find any.
> > > I don't know that we have any docs on that, but I believe the command you 
> > > want to execute is `sphinx-build -b html -d _build/doctrees . 
> > > _build/html` (I pulled this from make.bat in the docs directory.)
> > This is not the first time this has come up. Can you please add a comment 
> > to the top of AttrDocs.td which explains how to generate the HTML?
> Definitely a good idea, I'll tackle it when I have a moment.
I found the moment, and there are now some docs with r312811.

Btw, you want to use `make -f Makefile.sphinx html` (from within the docs 
directory) to generate the docs on non-Windows platforms.


https://reviews.llvm.org/D33852



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to