Skip to content

Commit e8450a2

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.6
2 parents 2ff2a07 + 76241dc commit e8450a2

File tree

3 files changed

+27
-11
lines changed

3 files changed

+27
-11
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,9 @@ Sanitizers
10451045
----------
10461046

10471047
- ``-fsanitize=vptr`` is no longer a part of ``-fsanitize=undefined``.
1048-
- Sanitizer ignorelists now support the syntax ``src:*=sanitize``.
1048+
- Sanitizer ignorelists now support the syntax ``src:*=sanitize``,
1049+
``type:*=sanitize``, ``fun:*=sanitize``, ``global:*=sanitize``,
1050+
and ``mainfile:*=sanitize``.
10491051

10501052
Python Binding Changes
10511053
----------------------

clang/docs/SanitizerSpecialCaseList.rst

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ instrumentation for arithmetic operations containing values of type ``int``.
7979

8080
The ``=sanitize`` category is also supported. Any ``=sanitize`` category
8181
entries enable sanitizer instrumentation, even if it was ignored by entries
82-
before.
82+
before. Entries can be ``src``, ``type``, ``global``, ``fun``, and
83+
``mainfile``.
8384

8485
With this, one may disable instrumentation for some or all types and
8586
specifically allow instrumentation for one or many types -- including types
@@ -103,7 +104,7 @@ supported sanitizers.
103104
}
104105
105106
If multiple entries match the source, then the latest entry takes the
106-
precedence.
107+
precedence. Here are a few examples.
107108

108109
.. code-block:: bash
109110
@@ -119,6 +120,19 @@ precedence.
119120
src:*/mylib/test.cc
120121
src:*/mylib/*=sanitize
121122
123+
$ cat ignorelist3.txt
124+
# Type T will not be instrumented.
125+
type:*
126+
type:T=sanitize
127+
type:T
128+
129+
$ cat ignorelist4.txt
130+
# Function `bad_bar`` will be instrumented.
131+
# Function `good_bar` will not be instrumented.
132+
fun:*
133+
fun:*bar
134+
fun:bad_bar=sanitize
135+
122136
Format
123137
======
124138

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -813,19 +813,19 @@ changes to one object won't affect the others, the object's initializer will run
813813
once per copy, etc.
814814

815815
Specifically, this warning fires when it detects an object which:
816-
1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
817-
2. Has external linkage (otherwise it's supposed to be duplicated), and
818-
3. Has hidden visibility.
816+
1. Is defined as ``inline`` in a header file (so it might get compiled into multiple libaries), and
817+
2. Has external linkage (otherwise it's supposed to be duplicated), and
818+
3. Has hidden visibility.
819819

820820
As well as one of the following:
821-
1. The object is mutable, or
822-
2. The object's initializer definitely has side effects.
821+
1. The object is mutable, or
822+
2. The object's initializer definitely has side effects.
823823

824824
The warning can be resolved by removing one of the conditions above. In rough
825825
order of preference, this may be done by:
826-
1. Marking the object ``const`` (if possible)
827-
2. Moving the object's definition to a source file
828-
3. Giving the object non-hidden visibility, e.g. using ``__attribute((visibility("default")))``.
826+
1. Marking the object ``const`` (if possible)
827+
2. Moving the object's definition to a source file
828+
3. Giving the object non-hidden visibility, e.g. using ``__attribute((visibility("default")))``.
829829

830830
Note that for (2), all levels of a pointer variable must be constant;
831831
``const int*`` will trigger the warning because the pointer itself is mutable.

0 commit comments

Comments
 (0)