[clang] [Clang] [C++26] Implement P1306R5 Expansion Statements (PR #165195)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 18 08:01:10 PST 2025
================
@@ -416,9 +420,10 @@ def warn_cxx98_compat_for_range : Warning<
"range-based for loop is incompatible with C++98">,
InGroup<CXX98Compat>, DefaultIgnore;
def err_for_range_identifier : Error<
- "range-based for loop requires type for loop variable">;
+ "%select{range-based for loop|expansion statement}0 requires "
----------------
Sirraide wrote:
There’s only 2 combinations because both `%select`s use index `0`; I’m assuming the for-range code has a test for the first option, and I *should* have one for the second option somewhere; if not I’ll add one.
https://github.com/llvm/llvm-project/pull/165195
More information about the cfe-commits
mailing list