[docs][clang] refactor diagnostic spec instruction and grammar nit - #213432
Open
hardikxk wants to merge 1 commit into
Open
[docs][clang] refactor diagnostic spec instruction and grammar nit#213432hardikxk wants to merge 1 commit into
hardikxk wants to merge 1 commit into
Conversation
A grammar nit found in the description of the Clang Diagnostic Subsystem is improved. Replace the instruction mentioning the use of "slash-newline" for writing multiple diagnostics with the appropriate "forward slash" as that's what is actually used for separting multiple diagnostics into more than one line. The change makes it more obvious on how to implement multi-line diagnostics by dropping the slightly ambigious slash-newline.
|
@llvm/pr-subscribers-clang Author: Hardik Kumar (hardikxk) ChangesA grammar nit found in the description of the Clang Diagnostic Subsystem is improved. Replace the instruction mentioning the use of "slash-newline" for writing multiple diagnostics with the appropriate "forward slash" as that's what is actually used for separting multiple diagnostics into more than one line. The change makes it more obvious on how to implement multi-line diagnostics by dropping the slightly ambigious slash-newline. Full diff: https://github.com/llvm/llvm-project/pull/213432.diff 1 Files Affected:
diff --git a/clang/docs/InternalsManual.rst b/clang/docs/InternalsManual.rst
index 4b263565bc27f..bf314dab23061 100644
--- a/clang/docs/InternalsManual.rst
+++ b/clang/docs/InternalsManual.rst
@@ -50,7 +50,7 @@ when the code is incorrect or dubious. In Clang, each diagnostic produced has
:ref:`SourceLocation <SourceLocation>` to "put the caret", and a severity
(e.g., ``WARNING`` or ``ERROR``). They can also optionally include a number of
arguments to the diagnostic (which fill in "%0"'s in the string) as well as a
-number of source ranges that related to the diagnostic.
+number of source ranges that are related to the diagnostic.
In this section, we'll be giving examples produced by the Clang command line
driver, but diagnostics can be :ref:`rendered in many different ways
@@ -3631,7 +3631,8 @@ diagnostics:
int A = B; // expected-error {{use of undeclared identifier 'B'}}
You can place as many diagnostics on one line as you wish. To make the code
-more readable, you can use slash-newline to separate out the diagnostics.
+more readable, you can use forward slash to separate out the diagnostics into
+multiple lines.
Alternatively, it is possible to specify the line on which the diagnostic
should appear by appending ``@<line>`` to ``expected-<type>``, for example:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A grammar nit found in the description of the Clang Diagnostic Subsystem is improved.
Replace the instruction mentioning the use of "slash-newline" for writing multiple diagnostics with the appropriate "forward slash" as that's what is actually used for separting multiple diagnostics into more than one line.
The change makes it more obvious on how to implement multi-line diagnostics by dropping the slightly ambigious slash-newline.