[clang] [clang] Reject array comparisons in C++26 for unknown/dependent types in templates (PR #191101)

via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 29 12:02:15 PDT 2026


================
@@ -486,6 +486,7 @@ Bug Fixes in This Version
 -------------------------
 
 - Fixed atomic boolean compound assignment; the conversion back to atomic bool would be miscompiled. (#GH33210)
+- Clang now rejects array comparisons done within lambda functions and templates, except in SFINAE contexts, which are just discarded instead. (GH#190756)
----------------
Sirraide wrote:

```suggestion
- Clang now diagnoses array comparisons within template instantiations. (GH#190756)
```
That is how SFINAE works by default w/ most errors; no need to mention that. Also, the main thing that matters for this bug is whether we’re in a template or not.

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


More information about the cfe-commits mailing list