| Issue |
209007
|
| Summary |
[clang] requires bounds after an item declaration are not parsed into RequiresExpr/ConceptSpecializationExpr
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
w-utter
|
when taking a look at the ast for the code
```cpp
template <typename T> void some_fn(T a) requires requires(T val) { { x + x }; };
```
gives the requires expr as a `CXCursor_DeclRefExpr` instead of a `CXCursor_RequiresExpr`, as what would happen with the declaration
```cpp
template <typename T> requires requires (T x) { x + x } void some_fn(T val);
```
Similarly, for concepts
```cpp
template <typename T> void some_fn(T a) requires std::is_integral<T>;
```
gives the requires expr as `CXCursor_TemplateRef` rather than a `CXCursor_ConceptSpecializationExpr` as what would happen with the declaration
```cpp
template <typename T> requires std::is_integral<T> void some_fn(T a);
```
`clang -v --verbose`:
```
Homebrew clang version 22.1.8
Target: arm64-apple-darwin23.2.0
Thread model: posix
InstalledDir: /opt/homebrew/Cellar/llvm/22.1.8/bin
Configuration file: /opt/homebrew/Cellar/llvm/22.1.8/etc/clang/arm64-apple-darwin23.cfg
System configuration file directory: /opt/homebrew/Cellar/llvm/22.1.8/etc/clang
User configuration file directory: /Users/wutter/.config/clang
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs