r201850 - Moving the documentation for the sanitizer negation attributes into AttrDocs.

Sean Silva silvas at purdue.edu
Sat Mar 1 16:31:45 PST 2014


Sorry to ping this again, but I'm seeing these Sphinx warnings due to the
labels that were removed. Do the TableGen'erated files have equivalent
labels that you could link to?

/home/sean/pg/llvm/llvm/tools/clang/docs/AddressSanitizer.rst:129: WARNING:
undefined label: langext-address_sanitizer (if the link has no caption the
label must precede a section header)
/home/sean/pg/llvm/llvm/tools/clang/docs/MemorySanitizer.rst:86: WARNING:
undefined label: langext-memory_sanitizer (if the link has no caption the
label must precede a section header)
/home/sean/pg/llvm/llvm/tools/clang/docs/ThreadSanitizer.rst:90: WARNING:
undefined label: langext-thread_sanitizer (if the link has no caption the
label must precede a section header)
/home/sean/pg/llvm/llvm/tools/clang/docs/ThreadSanitizer.rst:103: WARNING:
undefined label: langext-thread_sanitizer (if the link has no caption the
label must precede a section header)



On Fri, Feb 21, 2014 at 8:44 AM, Aaron Ballman <aaron at aaronballman.com>wrote:

> Author: aaronballman
> Date: Fri Feb 21 07:44:43 2014
> New Revision: 201850
>
> URL: http://llvm.org/viewvc/llvm-project?rev=201850&view=rev
> Log:
> Moving the documentation for the sanitizer negation attributes into
> AttrDocs.
>
> Modified:
>     cfe/trunk/docs/AttributeReference.rst
>     cfe/trunk/docs/LanguageExtensions.rst
>     cfe/trunk/include/clang/Basic/Attr.td
>     cfe/trunk/include/clang/Basic/AttrDocs.td
>
> Modified: cfe/trunk/docs/AttributeReference.rst
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/AttributeReference.rst?rev=201850&r1=201849&r2=201850&view=diff
>
> ==============================================================================
> --- cfe/trunk/docs/AttributeReference.rst (original)
> +++ cfe/trunk/docs/AttributeReference.rst Fri Feb 21 07:44:43 2014
> @@ -291,6 +291,44 @@ not ODR-equivalent.
>  Query for this feature with ``__has_attribute(enable_if)``.
>
>
> +no_sanitize_address (no_address_safety_analysis,
> gnu::no_address_safety_analysis, gnu::no_sanitize_address)
>
> +-----------------------------------------------------------------------------------------------------------
> +.. csv-table:: Supported Syntaxes
> +   :header: "GNU", "C++11", "__declspec", "Keyword"
> +
> +   "X","X","",""
> +
> +Use ``__attribute__((no_sanitize_address))`` on a function declaration to
> +specify that address safety instrumentation (e.g. AddressSanitizer) should
> +not be applied to that function.
> +
> +
> +no_sanitize_memory
> +------------------
> +.. csv-table:: Supported Syntaxes
> +   :header: "GNU", "C++11", "__declspec", "Keyword"
> +
> +   "X","","",""
> +
> +Use ``__attribute__((no_sanitize_memory))`` on a function declaration to
> +specify that checks for uninitialized memory should not be inserted
> +(e.g. by MemorySanitizer). The function may still be instrumented by the
> tool
> +to avoid false positives in other places.
> +
> +
> +no_sanitize_thread
> +------------------
> +.. csv-table:: Supported Syntaxes
> +   :header: "GNU", "C++11", "__declspec", "Keyword"
> +
> +   "X","","",""
> +
> +Use ``__attribute__((no_sanitize_thread))`` on a function declaration to
> +specify that checks for data races on plain (non-atomic) memory accesses
> should
> +not be inserted by ThreadSanitizer. The function is still instrumented by
> the
> +tool to avoid false positives and provide meaningful stack traces.
> +
> +
>  objc_method_family
>  ------------------
>  .. csv-table:: Supported Syntaxes
>
> Modified: cfe/trunk/docs/LanguageExtensions.rst
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LanguageExtensions.rst?rev=201850&r1=201849&r2=201850&view=diff
>
> ==============================================================================
> --- cfe/trunk/docs/LanguageExtensions.rst (original)
> +++ cfe/trunk/docs/LanguageExtensions.rst Fri Feb 21 07:44:43 2014
> @@ -1639,46 +1639,15 @@ in the analyzer's `list of source-level
>  Extensions for Dynamic Analysis
>  ===============================
>
> -.. _langext-address_sanitizer:
> -
> -AddressSanitizer
> -----------------
> -
>  Use ``__has_feature(address_sanitizer)`` to check if the code is being
> built
>  with :doc:`AddressSanitizer`.
>
> -Use ``__attribute__((no_sanitize_address))``
> -on a function declaration
> -to specify that address safety instrumentation (e.g. AddressSanitizer)
> should
> -not be applied to that function.
> -
> -.. _langext-thread_sanitizer:
> -
> -ThreadSanitizer
> -----------------
> -
>  Use ``__has_feature(thread_sanitizer)`` to check if the code is being
> built
>  with :doc:`ThreadSanitizer`.
>
> -Use ``__attribute__((no_sanitize_thread))`` on a function declaration
> -to specify that checks for data races on plain (non-atomic) memory
> accesses
> -should not be inserted by ThreadSanitizer.
> -The function is still instrumented by the tool to avoid false positives
> and
> -provide meaningful stack traces.
> -
> -.. _langext-memory_sanitizer:
> -
> -MemorySanitizer
> -----------------
>  Use ``__has_feature(memory_sanitizer)`` to check if the code is being
> built
>  with :doc:`MemorySanitizer`.
>
> -Use ``__attribute__((no_sanitize_memory))`` on a function declaration
> -to specify that checks for uninitialized memory should not be inserted
> -(e.g. by MemorySanitizer). The function may still be instrumented by the
> tool
> -to avoid false positives in other places.
> -
> -
>  Thread Safety Analysis
>  ======================
>
>
> Modified: cfe/trunk/include/clang/Basic/Attr.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Attr.td?rev=201850&r1=201849&r2=201850&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/Attr.td (original)
> +++ cfe/trunk/include/clang/Basic/Attr.td Fri Feb 21 07:44:43 2014
> @@ -1244,21 +1244,21 @@ def NoSanitizeAddress : InheritableAttr
>    let Spellings = [GCC<"no_address_safety_analysis">,
>                     GCC<"no_sanitize_address">];
>    let Subjects = SubjectList<[Function, FunctionTemplate], ErrorDiag>;
> -  let Documentation = [Undocumented];
> +  let Documentation = [NoSanitizeAddressDocs];
>  }
>
>  // Attribute to disable ThreadSanitizer checks.
>  def NoSanitizeThread : InheritableAttr {
>    let Spellings = [GNU<"no_sanitize_thread">];
>    let Subjects = SubjectList<[Function, FunctionTemplate], ErrorDiag>;
> -  let Documentation = [Undocumented];
> +  let Documentation = [NoSanitizeThreadDocs];
>  }
>
>  // Attribute to disable MemorySanitizer checks.
>  def NoSanitizeMemory : InheritableAttr {
>    let Spellings = [GNU<"no_sanitize_memory">];
>    let Subjects = SubjectList<[Function, FunctionTemplate], ErrorDiag>;
> -  let Documentation = [Undocumented];
> +  let Documentation = [NoSanitizeMemoryDocs];
>  }
>
>  // C/C++ Thread safety attributes (e.g. for deadlock, data race checking)
>
> Modified: cfe/trunk/include/clang/Basic/AttrDocs.td
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/AttrDocs.td?rev=201850&r1=201849&r2=201850&view=diff
>
> ==============================================================================
> --- cfe/trunk/include/clang/Basic/AttrDocs.td (original)
> +++ cfe/trunk/include/clang/Basic/AttrDocs.td Fri Feb 21 07:44:43 2014
> @@ -571,3 +571,35 @@ This attribute accepts a single paramete
>  ``unknown``, ``consumed``, or ``unconsumed``.
>    }];
>  }
> +
> +def NoSanitizeAddressDocs : Documentation {
> +  let Category = DocCatFunction;
> +  // This function has multiple distinct spellings, and so it requires a
> custom
> +  // heading to be specified. The most common spelling is sufficient.
> +  let Heading = "no_sanitize_address";
> +  let Content = [{
> +Use ``__attribute__((no_sanitize_address))`` on a function declaration to
> +specify that address safety instrumentation (e.g. AddressSanitizer) should
> +not be applied to that function.
> +  }];
> +}
> +
> +def NoSanitizeThreadDocs : Documentation {
> +  let Category = DocCatFunction;
> +  let Content = [{
> +Use ``__attribute__((no_sanitize_thread))`` on a function declaration to
> +specify that checks for data races on plain (non-atomic) memory accesses
> should
> +not be inserted by ThreadSanitizer. The function is still instrumented by
> the
> +tool to avoid false positives and provide meaningful stack traces.
> +  }];
> +}
> +
> +def NoSanitizeMemoryDocs : Documentation {
> +  let Category = DocCatFunction;
> +  let Content = [{
> +Use ``__attribute__((no_sanitize_memory))`` on a function declaration to
> +specify that checks for uninitialized memory should not be inserted
> +(e.g. by MemorySanitizer). The function may still be instrumented by the
> tool
> +to avoid false positives in other places.
> +  }];
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140301/6a0d623e/attachment.html>


More information about the cfe-commits mailing list