Skip to content
Snippets Groups Projects
Commit 5bd02d91 authored by Marek Polacek's avatar Marek Polacek
Browse files

c++: cp_parser_constant_expression cleanups

It's pointless to call *_rvalue_constant_expression when we're not using
the result.  Also apply some drive-by cleanups.

gcc/cp/ChangeLog:

	* parser.cc (cp_parser_constant_expression): Allow non_constant_p to be
	nullptr even when allow_non_constant_p is true.  Don't call
	_rvalue_constant_expression when not necessary.  Move local variable
	declarations closer to their first use.
	(cp_parser_static_assert): Don't pass a dummy down to
	cp_parser_constant_expression.
parent 51b997ea
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment