File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
tool/resources/org/antlr/v4/tool/templates/codegen/Cpp Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -272,13 +272,13 @@ void <r.factory.grammar.name>::<r.name>Action(<r.ctxType> *context, size_t actio
272272>>
273273
274274RuleSempredFunctionHeader(r, actions) ::= <<
275- bool <r.name>Sempred(<r.ctxType> *_localctx, size_t predicateIndex);
275+ bool <r.name>Sempred([[maybe_unused]] <r.ctxType> *_localctx, size_t predicateIndex);
276276>>
277277
278278RuleSempredFunction(r, actions) ::= <<
279279<! Called for both lexer and parser. But only one of them is actually available. Testing for the parser directly
280280 generates a warning, however. So do the check via the factory instead. !>
281- bool <if (r.factory.g.lexer)><lexer.name><else><parser.name><endif>::<r.name>Sempred(<r.ctxType> *_localctx, size_t predicateIndex) {
281+ bool <if (r.factory.g.lexer)><lexer.name><else><parser.name><endif>::<r.name>Sempred([[maybe_unused]] <r.ctxType> *_localctx, size_t predicateIndex) {
282282 switch (predicateIndex) {
283283 <actions: {index | case <index>: return <actions.(index)>}; separator=";\n">;
284284
You can’t perform that action at this time.
0 commit comments