Skip to content

Commit f469a54

Browse files
jensmaurerzygoloid
authored andcommitted
[std] Remove cross-references to the very same subclause
and add an automatic check.
1 parent 9de0569 commit f469a54

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed

source/classes.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2347,7 +2347,7 @@
23472347

23482348
\pnum
23492349
At the point of definition of a virtual destructor (including an implicit
2350-
definition\iref{class.dtor}), the non-array deallocation function is
2350+
definition), the non-array deallocation function is
23512351
determined as if for the expression \tcode{delete this} appearing in a
23522352
non-virtual destructor of the destructor's class (see~\ref{expr.delete}).
23532353
If the lookup fails or if the deallocation function has

source/declarations.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3641,7 +3641,7 @@
36413641
The invented type \grammarterm{template-parameter} is
36423642
a template parameter pack
36433643
if the corresponding \grammarterm{parameter-declaration}
3644-
declares a function parameter pack\iref{dcl.fct}.
3644+
declares a function parameter pack.
36453645
If the placeholder contains \tcode{decltype(auto)},
36463646
the program is ill-formed.
36473647
The adjusted function parameters of an abbreviated function template

source/iostreams.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12054,7 +12054,7 @@
1205412054
\item Replace each slash character in the \grammarterm{root-name} with a \grammarterm{preferred-separator}.
1205512055
\item Replace each \grammarterm{directory-separator} with a \grammarterm{preferred-separator}.
1205612056
\begin{note}
12057-
The generic pathname grammar\iref{fs.path.generic} defines \grammarterm{directory-separator} as one or more slashes and \grammarterm{preferred-separator}{s}.
12057+
The generic pathname grammar defines \grammarterm{directory-separator} as one or more slashes and \grammarterm{preferred-separator}{s}.
1205812058
\end{note}
1205912059
\item Remove each dot filename and any immediately following \grammarterm{directory-separator}.
1206012060
\item As long as any appear, remove a non-dot-dot filename immediately followed by a \grammarterm{directory-separator} and a dot-dot filename, along with any immediately following \grammarterm{directory-separator}.

source/time.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@
998998
\pnum
999999
A type \tcode{TC} meets the \oldconcept{TrivialClock} requirements if:
10001000
\begin{itemize}
1001-
\item \tcode{TC} meets the \oldconcept{Clock} requirements\iref{time.clock.req},
1001+
\item \tcode{TC} meets the \oldconcept{Clock} requirements,
10021002

10031003
\item the types \tcode{TC::rep}, \tcode{TC::duration}, and \tcode{TC::time_point}
10041004
meet the \oldconcept{EqualityComparable} (\tref{cpp17.equalitycomparable}) and

tools/check.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ for f in $texlibdesc; do
124124
sed 's/$/ <--- \\pnum missing/'
125125
done | grep . && exit 1
126126

127+
# Cross-references pointing to their own section.
128+
for f in $texfiles; do
129+
sed -n '/^\\rSec/{s/^.rSec.\[/S /;s/\].*$//;=;p};/\\iref{/{s/^.*\\.\?ref{\([-a-z.0-9]\+\)}.*/R \1/g;=;p}' $f |
130+
sed '/^[0-9]\+$/{N;s/\n/: /}' | sed "s/.*/$f:&/" |
131+
awk '$2 == "S" { seclabel = $3 } $2 == "R" && $3 == seclabel { print $1 " section self-reference to [" $3 "]" }'
132+
done | grep . && exit 1
133+
127134
# \placeholder before (
128135
#egrep 'placeholder{[-A-Za-z]*}@?\(' *.tex
129136
# to fix: sed -i 's/placeholder\({[-A-Za-z]*}@\?(\)/placeholdernc\1/g' *.tex

0 commit comments

Comments
 (0)