C++: Lambda formatting issues.

Fix code formatting in cases when '{' and '}' appear within expression
context (ex. lambda expression, initializer lists).

Change-Id: I42b28170a8d6d5fd08a9a1a8d8e7698219c18966
Reviewed-by: Erik Verbruggen <erik.verbruggen@nokia.com>
This commit is contained in:
Flex Ferrum
2012-02-19 14:35:41 +04:00
committed by Erik Verbruggen
parent 48b4abe877
commit 4ca6c51c7f
4 changed files with 91 additions and 8 deletions

View File

@@ -177,7 +177,16 @@ public: // must be public to make Q_GADGET introspection work
assign_open, // after an assignment token
expression, // after a '=' in a declaration_start once we're sure it's not '= {'
assign_open_or_initializer // after a '=' in a declaration start
assign_open_or_initializer, // after a '=' in a declaration start
lambda_instroducer_or_subscribtion, // just after '[' or in cases '[]' and '[id]' when we're not sure in the exact kind of expression
lambda_declarator_expected, // just after ']' in lambda_introducer_or_subscribtion
lambda_declarator_or_expression, // just after '](' when previous state is 'lambda_instroducer_or_subscribtion'
lambda_statement_expected,
lambda_instroducer, // when '=', '&' or ',' occurred within '[]'
lambda_declarator, // just after ']' when previous state is lambda_introducer
lambda_statement // just after '{' when previous state is lambda_declarator or lambda_declarator_or_expression
};
Q_ENUMS(StateType)