bloomberg/clang-p2996

Emit a diagnostic warning about parsing ambiguity in a conjunction

Opened this issue · 0 comments

While parsing a compound condition with a reflect expression on the left-hand side of an && operator, e.g.,

(refl != ^T && true)

the && token binds left to form the type T &&, whereas the author probably meant refl != (^T) && true. It would be great to detect this case and emit a warning diagnostic.