[clang] [clang][Sema] Fix Issue: #166957 - type inconsistency for constrained auto variables(Fixes #166957) (PR #167100)

Younan Zhang via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 8 02:22:22 PST 2025


https://github.com/zyn0217 requested changes to this pull request.

Did you AI-generate the patch? I would like to see some explanation as to why there was a discrepancy with TSI, and unfortunately your commit message doesn't seem to explain it very clearly.

If we were creating two AutoTypes, I think a right fix would be to combine them together in some way, other than adding odd checking in Sema without a reasonable explanation.

Besides, do we have similar issue on type constraints? E.g.

```cpp
void foo(Concept auto Param) {}
Concept auto bar(int) {}
```

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


More information about the cfe-commits mailing list