|
1 | 1 | Auto generated patch. Do not edit or delete it, even if empty.
|
| 2 | +diff -ruN --strip-trailing-cr a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp |
| 3 | +--- a/clang/lib/Sema/SemaTemplateDeduction.cpp |
| 4 | ++++ b/clang/lib/Sema/SemaTemplateDeduction.cpp |
| 5 | +@@ -951,9 +951,11 @@ |
| 6 | + |
| 7 | + // Skip over the pack elements that were expanded into separate arguments. |
| 8 | + // If we partially expanded, this is the number of partial arguments. |
| 9 | ++ // FIXME: `&& FixedNumExpansions` is a workaround for UB described in |
| 10 | ++ // https://github.com/llvm/llvm-project/issues/100095 |
| 11 | + if (IsPartiallyExpanded) |
| 12 | + PackElements += NumPartialPackArgs; |
| 13 | +- else if (IsExpanded) |
| 14 | ++ else if (IsExpanded && FixedNumExpansions) |
| 15 | + PackElements += *FixedNumExpansions; |
| 16 | + |
| 17 | + for (auto &Pack : Packs) { |
| 18 | +diff -ruN --strip-trailing-cr a/clang/test/SemaCXX/pr100095.cpp b/clang/test/SemaCXX/pr100095.cpp |
| 19 | +--- a/clang/test/SemaCXX/pr100095.cpp |
| 20 | ++++ b/clang/test/SemaCXX/pr100095.cpp |
| 21 | +@@ -0,0 +1,17 @@ |
| 22 | ++// RUN: %clang_cc1 -fsyntax-only -std=c++11 %s |
| 23 | ++// XFAIL: asserts |
| 24 | ++ |
| 25 | ++template <class> struct Pair; |
| 26 | ++template <class...> struct Tuple { |
| 27 | ++ template <class _Up> Tuple(_Up); |
| 28 | ++}; |
| 29 | ++template <typename> struct StatusOr; |
| 30 | ++template <int> using ElementType = int; |
| 31 | ++template <int... fields> |
| 32 | ++using Key = Tuple<ElementType<fields>...>; |
| 33 | ++template <int... fields> |
| 34 | ++StatusOr<Pair<Key<fields...>>> Parser(); |
| 35 | ++struct Helper { Helper(Tuple<>, Tuple<>, int, int); }; |
| 36 | ++struct D : Helper { |
| 37 | ++ D(Key<> f, int n, int e) : Helper(f, Parser<>, n, e) {} |
| 38 | ++}; |
2 | 39 | diff -ruN --strip-trailing-cr a/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h b/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
|
3 | 40 | --- a/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
|
4 | 41 | +++ b/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
|
|
0 commit comments