Revert two patches to fix GH58452 regression
authorErich Keane <erich.keane@intel.com>
Wed, 8 Mar 2023 20:12:33 +0000 (12:12 -0800)
committerErich Keane <erich.keane@intel.com>
Thu, 9 Mar 2023 17:16:53 +0000 (09:16 -0800)
commitacecf68c8b7c3c625cfa00f00f8ddc8f15baae44
tree9f5049ea11adcd325ddcbc04dd5e0177394dc06e
parent9c645a99e4e7451c0073dddea74d52dac7f7e837
Revert two patches to fix GH58452 regression

GH58452 is a regression in the 16.0 release branch caused by both:
b8a1b698afb2fc84819c7596090aabf4d826b436 and
3a0309c53674be56b5cfce038d78a0c2c6e2a98c

This patch reverts both of those to make the 'valid' code stop
diagnosing
at the expense of crashes on invalid + unclear diagnostics.

This patch also adds the tests from GH58452 to prevent any
re-application from breaking this again.

Revert "[clang] Improve diagnostics for expansion length mismatch"
This reverts commit 3a0309c53674be56b5cfce038d78a0c2c6e2a98c.
Revert "[clang] fix missing initialization of original number of expansions"
This reverts commit b8a1b698afb2fc84819c7596090aabf4d826b436.

Differential Revision: https://reviews.llvm.org/D145605
clang/include/clang/Sema/Sema.h
clang/include/clang/Sema/SemaInternal.h
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateVariadic.cpp
clang/lib/Sema/TreeTransform.h
clang/test/CXX/temp/temp.decls/temp.variadic/p5.cpp
clang/test/SemaTemplate/cxx1z-fold-expressions.cpp
clang/test/SemaTemplate/pack-deduction.cpp