LLVM/project b8d1f3dclang/lib/Sema SemaTemplateDeductionGuide.cpp, clang/test/SemaTemplate deduction-guide.cpp

[Clang] Fix an integer overflow issue in computing CTAD's parameter depth (#128704)

There were some cases where we computed incorrect template parameter
depths for synthesized CTAD, invalid as they might be, we still
shouldn't crash anyway.

Technically the only scenario in which the inner function template's
depth is 0 is when it lives within an explicit template specialization,
where the template parameter list is empty.

Fixes https://github.com/llvm/llvm-project/issues/128691
DeltaFile
+32-0clang/test/SemaTemplate/deduction-guide.cpp
+8-1clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+40-12 files

UnifiedSplitRaw