llvm / llvm/llvm-project

[clang-doc] The logical operators in constraints aren't preserved

Open
#173,418 0 comments 0 reactions 0 assignees View on GitHub
clang-doc
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

A full constraint expression like the following:

```
template requires Incrementable && Decrementable void Foo() {}
```

cant be reconstructed in documentation because the logical operators aren't preserved. The constraints are currently just serialized into an array of concept specializations. In order to reconstruct the full source spelling, we'd have to introduce binary operator objects somewhere in clang-doc, similar to clang's binary operator exprs.

Without preserving the conjunctive/disjunctive properties, displaying templates with more than one concept specialization doesn't seem useful.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.