Fix a few cases that were incorrectly parsed as unary-expressions
instead of postfix-expressions, and improve error recovery for postfix operators after unary-expressions. This covers nullptr, __null, and some calls to type traits with special parsing rules. We would previously not parse a postfix-expression suffix for these expressions, so would reject expressions such as __is_trivial(int)["foo"]. For the case where a postfix-expression suffix is *not* permitted after a unary-expression (for example, after a new-expression or sizeof expression), produce a diagnostic if one appears there anyway. That's always ill-formed, but previously produced very bad diagnostics.
Loading
Please sign in to comment