Skip to content

Commit f948cb2

Browse files
committed
Also fix the diagnostics link
1 parent 101fb01 commit f948cb2

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,15 @@ def d_Group : OptionGroup<"<d group>">, Group<Preprocessor_Group>,
149149
Flags allowing the state of the preprocessor to be dumped in various ways.}]>;
150150

151151
def Diag_Group : OptionGroup<"<W/R group>">, Group<CompileOnly_Group>,
152-
DocName<"Diagnostic options">, DocBrief<StringForProgram<[{
153-
Flags controlling which warnings, errors, and remarks %Program will generate.
154-
See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.}]>.str>;
152+
DocName<"Diagnostic options">,
153+
DocBrief<!strconcat(StringForProgram<
154+
"Flags controlling which warnings, errors, and remarks %Program will generate. ">.str,
155+
// When in clang link directly to the page.
156+
!cond(!eq(GlobalDocumentation.Program, "Clang"):
157+
"See the :doc:`full list of warning and remark flags <DiagnosticsReference>`.",
158+
// When elsewhere the link will not work.
159+
true:
160+
"See Clang's Diagnostic Reference for a full list of warning and remark flags."))>;
155161

156162
def R_Group : OptionGroup<"<R group>">, Group<Diag_Group>, DocFlatten;
157163
def R_value_Group : OptionGroup<"<R (with value) group>">, Group<R_Group>,

0 commit comments

Comments
 (0)