The right shift operator was not seen as a valid operator in a fold expression, which is PR32563.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Added the tests to the existing test file for fold operators that I didn't notice before :)
Comment Actions
Thanks!
lib/Parse/ParseExpr.cpp | ||
---|---|---|
273 | Do we ever need to pass in the Parser's GreaterThanIsOperator value here? (From a quick check, it looks like we never call isFoldOperator in any case where > might end a template argument list instead, but it's not completely obvious, because we do support parsing unparenthesized fold operators for better error handling in some cases.) Seems like it would be safer to pass the correct value in here, even if it happens to not matter right now. |
Comment Actions
Added some more tests.
If this patch is still ok can you please commit it @rsmith ? Thanks!
Do we ever need to pass in the Parser's GreaterThanIsOperator value here? (From a quick check, it looks like we never call isFoldOperator in any case where > might end a template argument list instead, but it's not completely obvious, because we do support parsing unparenthesized fold operators for better error handling in some cases.)
Seems like it would be safer to pass the correct value in here, even if it happens to not matter right now.