@@ -1686,7 +1686,7 @@ semantic checking for some attributes, etc.
1686
1686
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1687
1687
The first step to adding a new attribute to Clang is to add its definition to
1688
1688
`include/clang/Basic/Attr.td
1689
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ include/clang/Basic/Attr.td?view=markup > `_.
1689
+ <https://github.com/llvm /llvm-project/blob/master/clang/ include/clang/Basic/Attr.td> `_.
1690
1690
This tablegen definition must derive from the ``Attr `` (tablegen, not
1691
1691
semantic) type, or one of its derivatives. Most attributes will derive from the
1692
1692
``InheritableAttr `` type, which specifies that the attribute can be inherited by
@@ -1748,10 +1748,10 @@ the ``SubjectList``. The diagnostics generated for subject list violations are
1748
1748
either ``diag::warn_attribute_wrong_decl_type `` or
1749
1749
``diag::err_attribute_wrong_decl_type ``, and the parameter enumeration is found
1750
1750
in `include/clang/Sema/ParsedAttr.h
1751
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ include/clang/Sema/ParsedAttr.h?view=markup > `_
1751
+ <https://github.com/llvm /llvm-project/blob/master/clang/ include/clang/Sema/ParsedAttr.h> `_
1752
1752
If a previously unused Decl node is added to the ``SubjectList ``, the logic used
1753
1753
to automatically determine the diagnostic parameter in `utils/TableGen/ClangAttrEmitter.cpp
1754
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ utils/TableGen/ClangAttrEmitter.cpp?view=markup > `_
1754
+ <https://github.com/llvm /llvm-project/blob/master/clang/ utils/TableGen/ClangAttrEmitter.cpp> `_
1755
1755
may need to be updated.
1756
1756
1757
1757
By default, all subjects in the SubjectList must either be a Decl node defined
@@ -1773,7 +1773,7 @@ All attributes must have some form of documentation associated with them.
1773
1773
Documentation is table generated on the public web server by a server-side
1774
1774
process that runs daily. Generally, the documentation for an attribute is a
1775
1775
stand-alone definition in `include/clang/Basic/AttrDocs.td
1776
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ include/clang/Basic/AttdDocs .td?view=markup > `_
1776
+ <https://github.com/llvm /llvm-project/blob/master/clang/ include/clang/Basic/AttrDocs .td> `_
1777
1777
that is named after the attribute being documented.
1778
1778
1779
1779
If the attribute is not for public consumption, or is an implicitly-created
@@ -1824,7 +1824,7 @@ All arguments have a name and a flag that specifies whether the argument is
1824
1824
optional. The associated C++ type of the argument is determined by the argument
1825
1825
definition type. If the existing argument types are insufficient, new types can
1826
1826
be created, but it requires modifying `utils/TableGen/ClangAttrEmitter.cpp
1827
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ utils/TableGen/ClangAttrEmitter.cpp?view=markup > `_
1827
+ <https://github.com/llvm /llvm-project/blob/master/clang/ utils/TableGen/ClangAttrEmitter.cpp> `_
1828
1828
to properly support the type.
1829
1829
1830
1830
Other Properties
@@ -1836,7 +1836,7 @@ document, however a few deserve mention.
1836
1836
If the parsed form of the attribute is more complex, or differs from the
1837
1837
semantic form, the ``HasCustomParsing `` bit can be set to ``1 `` for the class,
1838
1838
and the parsing code in `Parser::ParseGNUAttributeArgs()
1839
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ lib/Parse/ParseDecl.cpp?view=markup > `_
1839
+ <https://github.com/llvm /llvm-project/blob/master/clang/ lib/Parse/ParseDecl.cpp> `_
1840
1840
can be updated for the special case. Note that this only applies to arguments
1841
1841
with a GNU spelling -- attributes with a __declspec spelling currently ignore
1842
1842
this flag and are handled by ``Parser::ParseMicrosoftDeclSpec ``.
@@ -1899,7 +1899,7 @@ semantic attribute class object, with ``public`` access.
1899
1899
Boilerplate
1900
1900
^^^^^^^^^^^
1901
1901
All semantic processing of declaration attributes happens in `lib/Sema/SemaDeclAttr.cpp
1902
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ lib/Sema/SemaDeclAttr.cpp?view=markup > `_,
1902
+ <https://github.com/llvm /llvm-project/blob/master/clang/ lib/Sema/SemaDeclAttr.cpp> `_,
1903
1903
and generally starts in the ``ProcessDeclAttribute() `` function. If the
1904
1904
attribute is a "simple" attribute -- meaning that it requires no custom semantic
1905
1905
processing aside from what is automatically provided, add a call to
@@ -1915,11 +1915,11 @@ correct minimum number of arguments are passed, etc.
1915
1915
1916
1916
If the attribute adds additional warnings, define a ``DiagGroup `` in
1917
1917
`include/clang/Basic/DiagnosticGroups.td
1918
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ include/clang/Basic/DiagnosticGroups.td?view=markup > `_
1918
+ <https://github.com/llvm /llvm-project/blob/master/clang/ include/clang/Basic/DiagnosticGroups.td> `_
1919
1919
named after the attribute's ``Spelling `` with "_"s replaced by "-"s. If there
1920
1920
is only a single diagnostic, it is permissible to use ``InGroup<DiagGroup<"your-attribute">> ``
1921
1921
directly in `DiagnosticSemaKinds.td
1922
- <https://llvm.org/viewvc /llvm-project/cfe/trunk/ include/clang/Basic/DiagnosticSemaKinds.td?view=markup > `_
1922
+ <https://github.com/llvm /llvm-project/blob/master/clang/ include/clang/Basic/DiagnosticSemaKinds.td> `_
1923
1923
1924
1924
All semantic diagnostics generated for your attribute, including automatically-
1925
1925
generated ones (such as subjects and argument counts), should have a
0 commit comments