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
272
272
>>
273
273
274
274
RuleSempredFunctionHeader(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);
276
276
>>
277
277
278
278
RuleSempredFunction(r, actions) ::= <<
279
279
<! Called for both lexer and parser. But only one of them is actually available. Testing for the parser directly
280
280
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) {
282
282
switch (predicateIndex) {
283
283
<actions: {index | case <index>: return <actions.(index)>}; separator=";\n">;
284
284
You can’t perform that action at this time.
0 commit comments