Skip to content

Commit 884a3ce

Browse files
committed
Disable parsing of C++ references in C mode
Fixes #564 Signed-off-by: Roberto Raggi <[email protected]>
1 parent 2240472 commit 884a3ce

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/parser/cxx/parser.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5800,6 +5800,7 @@ auto Parser::parse_cv_qualifier(SpecifierAST*& yyast, DeclSpecs& declSpecs)
58005800
}
58015801

58025802
auto Parser::parse_ref_qualifier(SourceLocation& refLoc) -> bool {
5803+
if (!is_parsing_cxx()) return false;
58035804
if (match(TokenKind::T_AMP, refLoc)) return true;
58045805
if (match(TokenKind::T_AMP_AMP, refLoc)) return true;
58055806
return false;

0 commit comments

Comments
 (0)