File tree Expand file tree Collapse file tree 1 file changed +30
-1
lines changed
Expand file tree Collapse file tree 1 file changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ Author: Daniel Kroening, kroening@cs.cmu.edu
2323#include " cpp_member_spec.h"
2424#include " cpp_enum_type.h"
2525
26+ #define DEBUG
2627#ifdef DEBUG
2728#include < iostream>
2829
@@ -6423,7 +6424,6 @@ bool Parser::rPostfixExpr(exprt &exp)
64236424 std::cout << std::string (__indent, ' ' ) << " Parser::rPostfixExpr 3\n " ;
64246425#endif
64256426
6426- lex.get_token (op);
64276427 if (!rFunctionArguments (e))
64286428 return false ;
64296429
@@ -6447,6 +6447,35 @@ bool Parser::rPostfixExpr(exprt &exp)
64476447 }
64486448 break ;
64496449
6450+ case ' {' :
6451+ #ifdef DEBUG
6452+ std::cout << std::string (__indent, ' ' ) << " Parser::rPostfixExpr 3a\n " ;
6453+ #endif
6454+
6455+ // this is a C++11 extension
6456+ if (!rInitializeExpr (e))
6457+ return false ;
6458+
6459+ if (lex.get_token (cp)!=' }' )
6460+ return false ;
6461+
6462+ #ifdef DEBUG
6463+ std::cout << std::string (__indent, ' ' ) << " Parser::rPostfixExpr 4a\n " ;
6464+ #endif
6465+
6466+ {
6467+ side_effect_expr_function_callt fc (
6468+ std::move (exp), {}, typet{}, source_locationt{});
6469+ fc.arguments ().reserve (e.operands ().size ());
6470+ set_location (fc, op);
6471+
6472+ Forall_operands (it, e)
6473+ fc.arguments ().push_back (*it);
6474+ e.operands ().clear (); // save some
6475+ exp.swap (fc);
6476+ }
6477+ break ;
6478+
64506479 case TOK_INCR:
64516480 lex.get_token (op);
64526481
You can’t perform that action at this time.
0 commit comments