LLVM/project 661dda9clang/include/clang/Basic LangOptions.def, clang/include/clang/Driver Options.td

[clang] Add frontend flag to enable support for broken external resugarers (#103219)

Forked from https://github.com/llvm/llvm-project/pull/102510 by
[mizvekov](https://github.com/mizvekov). Changes are captured as a fixup
commit.

There are some external projects that can't rely on our own sugar
propagation for templated entities, because they need to resugar types
which only exist within their framework, and so are entirely invisible
to our internal tooling.

This new flag is meant to prevent our transforms from removing any
Subst*
nodes.

For this, this is wired only to template type alias subsititutions.

Note that our AST does represent enough information to correctly
resugar template type alias, so any users of this are limited in their 
capacity to reconstruct the parameter substitutions fully.

---------

Co-authored-by: Matheus Izvekov <mizvekov at gmail.com>
DeltaFile
+18-0clang/test/AST/ast-dump-retain-subst-template-type-parm-type-ast-nodes.cpp
+9-3clang/lib/Sema/SemaTemplate.cpp
+6-0clang/include/clang/Driver/Options.td
+1-0clang/include/clang/Basic/LangOptions.def
+34-34 files

UnifiedSplitRaw