Handle C99 Compound Literals in return statements and argument lists.
commitc965e5a641d9478d23a233b48977503506b1b603
authorAlan Mackenzie <acm@muc.de>
Sun, 21 Jan 2018 18:29:26 +0000 (21 18:29 +0000)
committerAlan Mackenzie <acm@muc.de>
Sun, 21 Jan 2018 18:29:26 +0000 (21 18:29 +0000)
tree2cca92c3ce37854d33fc7bdc48c61ed9b434b27e
parentcff45e6f4e6a684d233140b5ab3edbf73fa5edae
Handle C99 Compound Literals in return statements and argument lists.

* lisp/progmodes/cc-engine.el (c-looking-at-or-maybe-in-bracelist): Recognize
a brace list when preceded by "return" or inside parentheses, either
immediately after the "(" or following a comma.
(c-looking-at-inexpr-block): Test c-has-compound-literals rather than hard
coded C++ Mode.
(c-guess-basic-syntax, CASE 7B): Test additionally for not being just inside a
parenthesis or being at a Java "new" keyword.  CASE 9: Remove the simple
minded test on the contents of a block to determine a brace list.

* lisp/progmodes/cc-langs.el (c-has-compound-literals): New lang const and lang var.
lisp/progmodes/cc-engine.el
lisp/progmodes/cc-langs.el