Skip to content

Commit c498038

Browse files
committed
C++ front-end: support constexpr inline <type> <name> declarations
We would previously only accept `inline constexpr`, but not the swapped order of keywords.
1 parent 5040e4d commit c498038

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/cpp/parse.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,10 @@ bool Parser::rDeclaration(cpp_declarationt &declaration)
14121412
if(!optCvQualify(cv_q))
14131413
return false;
14141414

1415+
if(member_spec.is_empty())
1416+
if(!optMemberSpec(member_spec))
1417+
return false;
1418+
14151419
// added these two to do "const static volatile int i=1;"
14161420
if(!optStorageSpec(storage_spec))
14171421
return false;

0 commit comments

Comments
 (0)