diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-11-29 18:13:22 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-11-29 18:13:22 -0500 |
commit | bc3597635a708cd91d742c91c6050829cfb4062a (patch) | |
tree | 03f9256df1c0903c0df4df1f652e4126da720a40 /gcc/doc | |
parent | b02b9e8df6558157daa50c356b9e777988a6bec3 (diff) | |
download | gcc-bc3597635a708cd91d742c91c6050829cfb4062a.zip gcc-bc3597635a708cd91d742c91c6050829cfb4062a.tar.gz gcc-bc3597635a708cd91d742c91c6050829cfb4062a.tar.bz2 |
Rename "libdiagnostics" to "libgdiagnostics"
"libdiagnostics" clashes with an existing soname in Debian, as
per:
https://gcc.gnu.org/pipermail/gcc/2024-November/245175.html
Rename it to "libgdiagnostics" for uniqueness.
I am being deliberately vague about what the "g" stands for:
it could be "gnu", "gcc", or "gpl-licensed" as the reader desires.
ChangeLog:
* configure.ac: Rename "libdiagnostics" to "libgdiagnostics".
* configure: Regenerate.
gcc/ChangeLog:
* Makefile.in: Rename "libdiagnostics" to "libgdiagnostics".
* configure.ac: Likewise.
* configure: Regenerate.
* doc/install.texi: Rename "libdiagnostics" to
"libgdiagnostics".
* doc/libdiagnostics/*: Rename to doc/libgdiagnostics, renaming
"libdiagnostics" to "libgdiagnostics" throughout.
* libdiagnostics++.h: Rename to...
* libgdiagnostics++.h: ...this, renaming "libdiagnostics" to
"libgdiagnostics" throughout.
* libdiagnostics.cc: Rename to...
* libgdiagnostics.cc: ...this, renaming "libdiagnostics" to
"libgdiagnostics" throughout.
* libdiagnostics.h: Rename to...
* libgdiagnostics.h: ...this, renaming "libdiagnostics" to
"libgdiagnostics" throughout.
* libdiagnostics.map: Rename to...
* libgdiagnostics.map: ...this, renaming "libdiagnostics" to
"libgdiagnostics" throughout.
* libsarifreplay.cc: Update for renaming of "libdiagnostics"
to "libgdiagnostics".
* libsarifreplay.h: Likewise.
* sarif-replay.cc: Likewise.
gcc/testsuite/ChangeLog:
* libdiagnostics.dg/*: Rename to libgdiagnostics.dg, renaming
"libdiagnostics" to "libgdiagnostics" throughout.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/install.texi | 6 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/Makefile (renamed from gcc/doc/libdiagnostics/Makefile) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/conf.py (renamed from gcc/doc/libdiagnostics/conf.py) | 2 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/index.rst (renamed from gcc/doc/libdiagnostics/index.rst) | 12 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/make.bat (renamed from gcc/doc/libdiagnostics/make.bat) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/diagnostic-manager.rst (renamed from gcc/doc/libdiagnostics/topics/diagnostic-manager.rst) | 2 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/diagnostics.rst (renamed from gcc/doc/libdiagnostics/topics/diagnostics.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/execution-paths.rst (renamed from gcc/doc/libdiagnostics/topics/execution-paths.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/fix-it-hints.rst (renamed from gcc/doc/libdiagnostics/topics/fix-it-hints.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/index.rst (renamed from gcc/doc/libdiagnostics/topics/index.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/logical-locations.rst (renamed from gcc/doc/libdiagnostics/topics/logical-locations.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/message-formatting.rst (renamed from gcc/doc/libdiagnostics/topics/message-formatting.rst) | 2 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/metadata.rst (renamed from gcc/doc/libdiagnostics/topics/metadata.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/physical-locations.rst (renamed from gcc/doc/libdiagnostics/topics/physical-locations.rst) | 14 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/retrofitting.rst (renamed from gcc/doc/libdiagnostics/topics/retrofitting.rst) | 4 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/sarif.rst (renamed from gcc/doc/libdiagnostics/topics/sarif.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/text-output.rst (renamed from gcc/doc/libdiagnostics/topics/text-output.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/topics/ux.rst (renamed from gcc/doc/libdiagnostics/topics/ux.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/01-hello-world.rst (renamed from gcc/doc/libdiagnostics/tutorial/01-hello-world.rst) | 22 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/02-physical-locations.rst (renamed from gcc/doc/libdiagnostics/tutorial/02-physical-locations.rst) | 20 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/03-logical-locations.rst (renamed from gcc/doc/libdiagnostics/tutorial/03-logical-locations.rst) | 0 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/04-notes.rst (renamed from gcc/doc/libdiagnostics/tutorial/04-notes.rst) | 4 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/05-warnings.rst (renamed from gcc/doc/libdiagnostics/tutorial/05-warnings.rst) | 2 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/06-fix-it-hints.rst (renamed from gcc/doc/libdiagnostics/tutorial/06-fix-it-hints.rst) | 4 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/07-execution-paths.rst (renamed from gcc/doc/libdiagnostics/tutorial/07-execution-paths.rst) | 10 | ||||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/example-1.png (renamed from gcc/doc/libdiagnostics/tutorial/example-1.png) | bin | 5646 -> 5646 bytes | |||
-rw-r--r-- | gcc/doc/libgdiagnostics/tutorial/index.rst (renamed from gcc/doc/libdiagnostics/tutorial/index.rst) | 2 |
27 files changed, 53 insertions, 53 deletions
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 03575c2..97d9aaf 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1231,8 +1231,8 @@ virtual calls in verifiable mode at all. However the libvtv library will still be built (see @option{--disable-libvtv} to turn off building libvtv). @option{--disable-vtable-verify} is the default. -@item --enable-libdiagnostics -Specify whether to build @code{libdiagnostics}, a shared library exposing +@item --enable-libgdiagnostics +Specify whether to build @code{libgdiagnostics}, a shared library exposing GCC's diagnostics capabilities via a C API, and a C++ wrapper API adding ``syntactic sugar''. @@ -1241,7 +1241,7 @@ This option requires @option{--enable-host-shared} on non-Windows hosts. This option also enables @code{sarif-replay}, a command-line tool for viewing @uref{https://sarif.info/,,SARIF files}. @code{sarif-replay} takes one or more @code{.sarif} files as input and attempts to replay any -diagnostics within them to stderr (via @code{libdiagnostics}) in the style +diagnostics within them to stderr (via @code{libgdiagnostics}) in the style of GCC's diagnostics. @item --disable-gcov diff --git a/gcc/doc/libdiagnostics/Makefile b/gcc/doc/libgdiagnostics/Makefile index d4bb2cb..d4bb2cb 100644 --- a/gcc/doc/libdiagnostics/Makefile +++ b/gcc/doc/libgdiagnostics/Makefile diff --git a/gcc/doc/libdiagnostics/conf.py b/gcc/doc/libgdiagnostics/conf.py index 1ff7552..8e92e12 100644 --- a/gcc/doc/libdiagnostics/conf.py +++ b/gcc/doc/libgdiagnostics/conf.py @@ -6,7 +6,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = 'libdiagnostics' +project = 'libgdiagnostics' copyright = '2024, David Malcolm' author = 'David Malcolm' diff --git a/gcc/doc/libdiagnostics/index.rst b/gcc/doc/libgdiagnostics/index.rst index a05eb4e..853331d 100644 --- a/gcc/doc/libdiagnostics/index.rst +++ b/gcc/doc/libgdiagnostics/index.rst @@ -15,10 +15,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. -libdiagnostics -============== +libgdiagnostics +=============== -This document describes `libdiagnostics <https://gcc.gnu.org/wiki/libdiagnostics>`_, +This document describes `libgdiagnostics <https://gcc.gnu.org/wiki/libgdiagnostics>`_, an API for programs to use to emit diagnostics (such as for "lint"-style checker tools), supporting: @@ -82,9 +82,9 @@ tools), supporting: There are actually two APIs for the library: -* a pure C API: ``libdiagnostics.h`` +* a pure C API: ``libgdiagnostics.h`` -* a C++ wrapper API: ``libdiagnostics+.h``. This is a header-only +* a C++ wrapper API: ``libgdiagnostics+.h``. This is a header-only collection of wrapper classes around the C API to give a less verbose API. @@ -99,7 +99,7 @@ Contents tutorial/index.rst topics/index.rst -libdiagnostics is free software: you can redistribute it and/or modify it +libgdiagnostics is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. diff --git a/gcc/doc/libdiagnostics/make.bat b/gcc/doc/libgdiagnostics/make.bat index 954237b..954237b 100644 --- a/gcc/doc/libdiagnostics/make.bat +++ b/gcc/doc/libgdiagnostics/make.bat diff --git a/gcc/doc/libdiagnostics/topics/diagnostic-manager.rst b/gcc/doc/libgdiagnostics/topics/diagnostic-manager.rst index 7f86f6b..e370cfc 100644 --- a/gcc/doc/libdiagnostics/topics/diagnostic-manager.rst +++ b/gcc/doc/libgdiagnostics/topics/diagnostic-manager.rst @@ -23,7 +23,7 @@ Diagnostic Managers .. type:: diagnostic_manager; A :type:`diagnostic_manager` is an opaque bundle of state for a client of -libdiagnostics. +libgdiagnostics. It has zero of more "output sinks" to which diagnostics are emitted. diff --git a/gcc/doc/libdiagnostics/topics/diagnostics.rst b/gcc/doc/libgdiagnostics/topics/diagnostics.rst index 66f0a25..66f0a25 100644 --- a/gcc/doc/libdiagnostics/topics/diagnostics.rst +++ b/gcc/doc/libgdiagnostics/topics/diagnostics.rst diff --git a/gcc/doc/libdiagnostics/topics/execution-paths.rst b/gcc/doc/libgdiagnostics/topics/execution-paths.rst index 3f4109c..3f4109c 100644 --- a/gcc/doc/libdiagnostics/topics/execution-paths.rst +++ b/gcc/doc/libgdiagnostics/topics/execution-paths.rst diff --git a/gcc/doc/libdiagnostics/topics/fix-it-hints.rst b/gcc/doc/libgdiagnostics/topics/fix-it-hints.rst index 08acb71..08acb71 100644 --- a/gcc/doc/libdiagnostics/topics/fix-it-hints.rst +++ b/gcc/doc/libgdiagnostics/topics/fix-it-hints.rst diff --git a/gcc/doc/libdiagnostics/topics/index.rst b/gcc/doc/libgdiagnostics/topics/index.rst index 064340b..064340b 100644 --- a/gcc/doc/libdiagnostics/topics/index.rst +++ b/gcc/doc/libgdiagnostics/topics/index.rst diff --git a/gcc/doc/libdiagnostics/topics/logical-locations.rst b/gcc/doc/libgdiagnostics/topics/logical-locations.rst index 85900b6..85900b6 100644 --- a/gcc/doc/libdiagnostics/topics/logical-locations.rst +++ b/gcc/doc/libgdiagnostics/topics/logical-locations.rst diff --git a/gcc/doc/libdiagnostics/topics/message-formatting.rst b/gcc/doc/libgdiagnostics/topics/message-formatting.rst index 9d42f89..086e894 100644 --- a/gcc/doc/libdiagnostics/topics/message-formatting.rst +++ b/gcc/doc/libgdiagnostics/topics/message-formatting.rst @@ -20,7 +20,7 @@ Message formatting ================== -Various libdiagnostics entrypoints take a format string and +Various libgdiagnostics entrypoints take a format string and variadic arguments. The format strings take codes prefixed by ``%``, or ``%q`` to put diff --git a/gcc/doc/libdiagnostics/topics/metadata.rst b/gcc/doc/libgdiagnostics/topics/metadata.rst index c62792a..c62792a 100644 --- a/gcc/doc/libdiagnostics/topics/metadata.rst +++ b/gcc/doc/libgdiagnostics/topics/metadata.rst diff --git a/gcc/doc/libdiagnostics/topics/physical-locations.rst b/gcc/doc/libgdiagnostics/topics/physical-locations.rst index bad2b8d..cf10f53 100644 --- a/gcc/doc/libdiagnostics/topics/physical-locations.rst +++ b/gcc/doc/libgdiagnostics/topics/physical-locations.rst @@ -78,25 +78,25 @@ locations. .. type:: diagnostic_line_num_t A :type:`diagnostic_line_num_t` is used for representing line numbers -within text files. libdiagnostics treats the first line of a text file +within text files. libgdiagnostics treats the first line of a text file as line 1. .. type:: diagnostic_column_num_t A :type:`diagnostic_column_num_t` is used for representing column numbers -within text files. libdiagnostics treats the first column of a text line +within text files. libgdiagnostics treats the first column of a text line as column 1, **not** column 0. .. note:: - Both libdiagnostics and Emacs number source *lines* starting at 1, but + Both libgdiagnostics and Emacs number source *lines* starting at 1, but they have differing conventions for *columns*. - libdiagnostics uses a 1-based convention for source columns, + libgdiagnostics uses a 1-based convention for source columns, whereas Emacs's ``M-x column-number-mode`` uses a 0-based convention. For example, an error in the initial, left-hand - column of source line 3 is reported by libdiagnostics as:: + column of source line 3 is reported by libgdiagnostics as:: some-file.c:3:1: error: ...etc... @@ -107,7 +107,7 @@ as column 1, **not** column 0. some-file.c 10% (3, 0) - i.e. ``3:1:`` in libdiagnostics corresponds to ``(3, 0)`` in Emacs. + i.e. ``3:1:`` in libgdiagnostics corresponds to ``(3, 0)`` in Emacs. .. type:: diagnostic_physical_location @@ -267,7 +267,7 @@ This diagnostic has three locations For example, - .. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-labelled-ranges.c + .. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-labelled-ranges.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ diff --git a/gcc/doc/libdiagnostics/topics/retrofitting.rst b/gcc/doc/libgdiagnostics/topics/retrofitting.rst index d034057..3c7198d 100644 --- a/gcc/doc/libdiagnostics/topics/retrofitting.rst +++ b/gcc/doc/libgdiagnostics/topics/retrofitting.rst @@ -17,7 +17,7 @@ .. default-domain:: c -Adding libdiagnostics to an existing project -============================================ +Adding libgdiagnostics to an existing project +============================================= TODO diff --git a/gcc/doc/libdiagnostics/topics/sarif.rst b/gcc/doc/libgdiagnostics/topics/sarif.rst index 3fd75ed..3fd75ed 100644 --- a/gcc/doc/libdiagnostics/topics/sarif.rst +++ b/gcc/doc/libgdiagnostics/topics/sarif.rst diff --git a/gcc/doc/libdiagnostics/topics/text-output.rst b/gcc/doc/libgdiagnostics/topics/text-output.rst index 32b2a54..32b2a54 100644 --- a/gcc/doc/libdiagnostics/topics/text-output.rst +++ b/gcc/doc/libgdiagnostics/topics/text-output.rst diff --git a/gcc/doc/libdiagnostics/topics/ux.rst b/gcc/doc/libgdiagnostics/topics/ux.rst index fc96e17..fc96e17 100644 --- a/gcc/doc/libdiagnostics/topics/ux.rst +++ b/gcc/doc/libgdiagnostics/topics/ux.rst diff --git a/gcc/doc/libdiagnostics/tutorial/01-hello-world.rst b/gcc/doc/libgdiagnostics/tutorial/01-hello-world.rst index 4635687..67f54c0 100644 --- a/gcc/doc/libdiagnostics/tutorial/01-hello-world.rst +++ b/gcc/doc/libgdiagnostics/tutorial/01-hello-world.rst @@ -23,17 +23,17 @@ Tutorial part 1: "Hello world" Before we look at the details of the API, let's look at building and running programs that use the library. -Here's a toy program that uses libdiagnostics to emit an error message +Here's a toy program that uses libgdiagnostics to emit an error message to stderr. - .. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-example-1.c + .. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-example-1.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ Copy the above to `tut01-hello-world.c`. -Assuming you have libdiagnostics installed, build the test program +Assuming you have libgdiagnostics installed, build the test program using: .. code-block:: console @@ -61,11 +61,11 @@ Obviously a trivial example like the above could be done using ``fprintf`` on stderr, and it's fairly easy to colorize text at the terminal. In :doc:`the next part of the tutorial <02-physical-locations>` we'll add -file/location information to our error messages, and libdiagnostics will +file/location information to our error messages, and libgdiagnostics will quote the pertinent parts of the file, underlining them, which is less trivial -to reimplement. libdiagnostics gives us many other such abilities, such as +to reimplement. libgdiagnostics gives us many other such abilities, such as fix-it hints and execution paths, which we'll cover in the following -tutorials. Also, once a program's diagnostics are using libdiagnostics, +tutorials. Also, once a program's diagnostics are using libgdiagnostics, it is trivial to add support for outputting them in machine-readable form as :doc:`SARIF <../topics/sarif>`. @@ -74,7 +74,7 @@ Structure ********* The above example shows the typical structure of a program using -libdiagnostics: +libgdiagnostics: * **initialization**: create a :type:`diagnostic_manager` instance, and create an output sink for it, and other one-time initialization @@ -91,7 +91,7 @@ libdiagnostics: For non-trivial examples we'll also want to create location information, which could happen during initialization, or during a parsing phase of -the program using libdiagnostics. See :doc:`02-physical-locations` for +the program using libgdiagnostics. See :doc:`02-physical-locations` for more information. @@ -99,7 +99,7 @@ Formatted messages ****************** The above example uses :func:`diagnostic_finish`, which takes a format -string and arguments. libdiagnostics has its own style of format +string and arguments. libgdiagnostics has its own style of format string arguments used for :func:`diagnostic_finish` and some other entrypoints. @@ -128,7 +128,7 @@ terminal, and the quotes will be internationalized, so that e.g. with Note that: -* the string ``error`` has been localized by libdiagnostics to +* the string ``error`` has been localized by libgdiagnostics to ``erreur``, * locale-specific quoting has been used (``«`` and ``»`` rather than @@ -161,7 +161,7 @@ leading to output like this:: my-awesome-checker: error: can't find ‘foo’ There are various other functions for -:doc:`supplying metadata to libdiagnostics <../../topics/metadata>`. +:doc:`supplying metadata to libgdiagnostics <../../topics/metadata>`. Moving beyond trivial examples diff --git a/gcc/doc/libdiagnostics/tutorial/02-physical-locations.rst b/gcc/doc/libgdiagnostics/tutorial/02-physical-locations.rst index 2e429de..71d836ed 100644 --- a/gcc/doc/libdiagnostics/tutorial/02-physical-locations.rst +++ b/gcc/doc/libgdiagnostics/tutorial/02-physical-locations.rst @@ -20,7 +20,7 @@ Tutorial part 2: physical locations =================================== -libdiagnostics has two kinds of location: +libgdiagnostics has two kinds of location: * *physical locations* expressed in terms of a specific file, and line(s) and perhaps column(s), such as ``some-file.c:3:1``, or a range of @@ -100,9 +100,9 @@ For example, given this example input where the tool can't find the header:: #include <foo.h> -we could complain about it via libdiagnostics via: +we could complain about it via libgdiagnostics via: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-no-column.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-no-column.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ @@ -112,10 +112,10 @@ leading to output like this:: foo.c:17: error: can't find 'foo.h'" 17 | #include <foo.h> -where libdiagnostics will attempt to load the source file and +where libgdiagnostics will attempt to load the source file and quote the pertinent line. -If libdiagnostics cannot open the file, it will merely print:: +If libgdiagnostics cannot open the file, it will merely print:: foo.c:17: error: can't find 'foo.h' @@ -149,7 +149,7 @@ start of the range, another one for the end of the range, and then using these two to create a :type:`diagnostic_physical_location` for the range as a whole: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-error.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-error.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ @@ -160,10 +160,10 @@ On compiling and running the program, we should get this output:: 17 | #include <foo.h> | ^~~~~ -where libdiagnostics will attempt to load the source file and +where libgdiagnostics will attempt to load the source file and underling the pertinent part of the given line. -If libdiagnostics cannot open the file, it will merely print:: +If libgdiagnostics cannot open the file, it will merely print:: foo.c:17:8: error: can't find 'foo' @@ -208,7 +208,7 @@ the following :type:`diagnostic` has its primary location where the missing comma should be, and secondary locations for each of the string literals ``"foo"``, ``"bar"``, and ``"baz"``, added via :func:`diagnostic_add_location`: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-multiple-lines.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-multiple-lines.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ @@ -238,7 +238,7 @@ Consider emitting a "type mismatch" diagnostic for:: where the primary location is on the ``+``, with secondary locations on the``42`` and the ``"foo"``: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-labelled-ranges.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-labelled-ranges.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ diff --git a/gcc/doc/libdiagnostics/tutorial/03-logical-locations.rst b/gcc/doc/libgdiagnostics/tutorial/03-logical-locations.rst index d36ac09..d36ac09 100644 --- a/gcc/doc/libdiagnostics/tutorial/03-logical-locations.rst +++ b/gcc/doc/libgdiagnostics/tutorial/03-logical-locations.rst diff --git a/gcc/doc/libdiagnostics/tutorial/04-notes.rst b/gcc/doc/libgdiagnostics/tutorial/04-notes.rst index 117eb6f..81755b2 100644 --- a/gcc/doc/libdiagnostics/tutorial/04-notes.rst +++ b/gcc/doc/libgdiagnostics/tutorial/04-notes.rst @@ -30,12 +30,12 @@ We want to generate output like this:: test-with-note.c:17:11: note: have you looked behind the couch? The "error" and "note" are both instances of :type:`diagnostic`. -We want to let libdiagnostics know that they are grouped together. +We want to let libgdiagnostics know that they are grouped together. The way to do this is to use :func:`diagnostic_manager_begin_group` and :func:`diagnostic_manager_end_group` around the "finish" calls to the diagnostics. -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-error-with-note.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-error-with-note.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ diff --git a/gcc/doc/libdiagnostics/tutorial/05-warnings.rst b/gcc/doc/libgdiagnostics/tutorial/05-warnings.rst index 1512ae7..8362318 100644 --- a/gcc/doc/libdiagnostics/tutorial/05-warnings.rst +++ b/gcc/doc/libgdiagnostics/tutorial/05-warnings.rst @@ -26,7 +26,7 @@ such as warnings. We can select different kinds of diagnostic via :enum:`diagnostic_level` when calling :func:`diagnostic_begin`: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-warning.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-warning.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ diff --git a/gcc/doc/libdiagnostics/tutorial/06-fix-it-hints.rst b/gcc/doc/libgdiagnostics/tutorial/06-fix-it-hints.rst index 9486ab7..f3c32ad 100644 --- a/gcc/doc/libdiagnostics/tutorial/06-fix-it-hints.rst +++ b/gcc/doc/libgdiagnostics/tutorial/06-fix-it-hints.rst @@ -20,13 +20,13 @@ Tutorial part 6: fix-it hints ============================= -libdiagnostics supports adding "fix-it hints" to a :type:`diagnostic`: +libgdiagnostics supports adding "fix-it hints" to a :type:`diagnostic`: suggestions for the user on how to edit their code to fix a problem. These can be expressed as insertions, replacements, and removals of text. For example, here we add a replacement fix-it hint to a diagnostic: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-fix-it-hint.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-fix-it-hint.c :language: c :start-after: /* begin quoted source */ :end-before: /* end quoted source */ diff --git a/gcc/doc/libdiagnostics/tutorial/07-execution-paths.rst b/gcc/doc/libgdiagnostics/tutorial/07-execution-paths.rst index 0fbbed2..3c0ba71 100644 --- a/gcc/doc/libdiagnostics/tutorial/07-execution-paths.rst +++ b/gcc/doc/libgdiagnostics/tutorial/07-execution-paths.rst @@ -28,7 +28,7 @@ bugs in `CPython extension code <https://docs.python.org/3/c-api/index.html>`_. Let's say we're analyzing this code: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-warning-with-path.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-warning-with-path.c :language: c :start-after: begin fake source :end-before: end fake source @@ -82,14 +82,14 @@ pointer (see `§3.10.3 "URIs that use the sarif scheme" <https://docs.oasis-open Let's add an event between these describing control flow, creating three events in all: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-warning-with-path.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-warning-with-path.c :language: c :start-after: begin path creation :end-before: end path creation Assuming we also gave it :type:`diagnostic_logical_location` with: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-warning-with-path.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-warning-with-path.c :language: c :start-after: begin create logical locs :end-before: end create logical locs @@ -128,7 +128,7 @@ and for SARIF sinks the path will be added as a ``codeFlow`` object Here's the above example in full: -.. literalinclude:: ../../../testsuite/libdiagnostics.dg/test-warning-with-path.c +.. literalinclude:: ../../../testsuite/libgdiagnostics.dg/test-warning-with-path.c :language: c :start-after: begin full example :end-before: end full example @@ -137,5 +137,5 @@ Here's the above example in full: Moving on ********* -That's the end of the tutorial. For more information on libdiagnostics, see +That's the end of the tutorial. For more information on libgdiagnostics, see the :doc:`topic guide <../topics/index>`. diff --git a/gcc/doc/libdiagnostics/tutorial/example-1.png b/gcc/doc/libgdiagnostics/tutorial/example-1.png Binary files differindex d637103..d637103 100644 --- a/gcc/doc/libdiagnostics/tutorial/example-1.png +++ b/gcc/doc/libgdiagnostics/tutorial/example-1.png diff --git a/gcc/doc/libdiagnostics/tutorial/index.rst b/gcc/doc/libgdiagnostics/tutorial/index.rst index 6ea6866..0bad00e 100644 --- a/gcc/doc/libdiagnostics/tutorial/index.rst +++ b/gcc/doc/libgdiagnostics/tutorial/index.rst @@ -18,7 +18,7 @@ Tutorial ======== -The following tutorial gives an overview of how to use libdiagnostics. +The following tutorial gives an overview of how to use libgdiagnostics. .. toctree:: :maxdepth: 2 |