[clang] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Thu May 9 09:31:06 PDT 2024


mizvekov wrote:

> @mizvekov I have a [reduced test case](https://github.com/llvm/llvm-project/files/15261978/repro.zip) for the crash @sam-mccall reported.
> 
> Clang does not crash before but crashes at this revision.

Thanks. I confirm it crashes, but it crashes on clang 18.1.4 as well, if one just passes `-frelaxed-template-template-args`.
So most likely this is the same problem, we exposed it by default, but wasn't caused by changes in this patch per se.

The program became invalid with the change. The crash is most likely secondary, caused by bad error recovery.

The former is the most interesting thing here, we can try to see if it's one of the cases where we can solve with additional wording, but the reduction process might have mangled this.

Is it possible the original code already had workaround for template-template-args with GCC, but the workaround was otherwise GCC specific, not using the feature testing macro?


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


More information about the cfe-commits mailing list