[clang] [Clang] [C++26] P1306R5: Iterating expansion statements using string injection (PR #208877)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 5 01:40:06 PDT 2026


================

----------------
zwuis wrote:

Can we add tests with carets of diagnostics pointing to injected string?

<details>
<summary>Example</summary>

```cpp
struct S {
  struct Iterator {};
  constexpr Iterator begin() const { return {}; }
  constexpr Iterator end() const { return {}; }
};
void f() {
  static constexpr S s;
  template for (auto x : s)
    ;
}
```

</details>

https://github.com/llvm/llvm-project/pull/208877


More information about the cfe-commits mailing list