================ @@ -654,36 +654,41 @@ As a result, ``EXCLUDES`` can easily produce false negatives: Negative requirements are an alternative to ``EXCLUDES`` that provide -a stronger safety guarantee. A negative requirement uses the ``REQUIRES`` -attribute, in conjunction with the ``!`` operator, to indicate that a capability -should *not* be held. - -For example, using ``REQUIRES(!mu)`` instead of ``EXCLUDES(mu)`` will produce -the appropriate warnings: +a stronger safety guarantee. A negative requirement uses either +``REQUIRES_NEGATIVE`` or the ``REQUIRES`` attribute in conjunction with the +``!`` operator to indicate that a capability should *not* be held. +``REQUIRES_NEGATIVE(mu)`` does not require ``!mu`` to be a well-formed +expression. More generally, its argument is interpreted the same way as a +``REQUIRES`` argument, and then the capability requirement is inverted. For +example, if ``!mu`` is well-formed, ``REQUIRES_NEGATIVE(!mu)`` is equivalent +to ``REQUIRES(mu)``. + ---------------- AnthonyCalandraGeotab wrote:
I used `REQUIRES_NEGATIVE` but another option I considered was `REQUIRES_NOT`. https://github.com/llvm/llvm-project/pull/203099 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
