llvm-project
aea60ab9 - [clang-format] Make bitwise and imply requires clause (#110942)

Commit
343 days ago
[clang-format] Make bitwise and imply requires clause (#110942) This patch adjusts the requires clause/expression parser to imply a requires clause if it is preceded by a bitwise and operator `&`, and assume it is a reference qualifier. The justification is that bitwise operations should not be used for requires expressions. This is a band-aid fix. The real problems lie in the lookahead heuristic in the same method. It may be worth it to rewrite that whole heuristic to track more state in the future, instead of just blindly marching forward across multiple unrelated definitions, since right now, the definition following the one with the requires clause can influence whether the heuristic chooses clause or expression. Fixes https://github.com/llvm/llvm-project/issues/110485
Author
Parents
Loading