Skip to content

Commit 3917bdd

Browse files
committed
Revert "[clang] Add frontend flag to enable support for broken external resugarers (#103219)"
This reverts commit 661dda9.
1 parent 0899936 commit 3917bdd

File tree

4 files changed

+3
-34
lines changed

4 files changed

+3
-34
lines changed

clang/include/clang/Basic/LangOptions.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ LANGOPT(Coroutines , 1, 0, "C++20 coroutines")
161161
LANGOPT(CoroAlignedAllocation, 1, 0, "prefer Aligned Allocation according to P2014 Option 2")
162162
LANGOPT(DllExportInlines , 1, 1, "dllexported classes dllexport inline methods")
163163
LANGOPT(ExperimentalLibrary, 1, 0, "enable unstable and experimental library features")
164-
LANGOPT(RetainSubstTemplateTypeParmTypeAstNodes, 1, 0, "retain SubstTemplateTypeParmType nodes in the AST's representation of alias template specializations")
165164

166165
LANGOPT(PointerAuthIntrinsics, 1, 0, "pointer authentication intrinsics")
167166
LANGOPT(PointerAuthCalls , 1, 0, "function pointer authentication")

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3508,12 +3508,6 @@ defm application_extension : BoolFOption<"application-extension",
35083508
PosFlag<SetTrue, [], [ClangOption, CC1Option],
35093509
"Restrict code to those available for App Extensions">,
35103510
NegFlag<SetFalse>>;
3511-
defm retain_subst_template_type_parm_type_ast_nodes : BoolFOption<"retain-subst-template-type-parm-type-ast-nodes",
3512-
LangOpts<"RetainSubstTemplateTypeParmTypeAstNodes">, DefaultFalse,
3513-
PosFlag<SetTrue, [], [CC1Option], "Enable">,
3514-
NegFlag<SetFalse, [], [], "Disable">,
3515-
BothFlags<[], [], " retain SubstTemplateTypeParmType nodes in the AST's representation"
3516-
" of alias template specializations">>;
35173511
defm sized_deallocation : BoolFOption<"sized-deallocation",
35183512
LangOpts<"SizedDeallocation">, Default<cpp14.KeyPath>,
35193513
PosFlag<SetTrue, [], [], "Enable C++14 sized global deallocation functions">,

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3529,16 +3529,10 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
35293529
if (Pattern->isInvalidDecl())
35303530
return QualType();
35313531

3532-
// Only substitute for the innermost template argument list. NOTE: Some
3533-
// external resugarers rely on leaving a Subst* node here. Make the
3534-
// substitution non-final in that case. Note that these external resugarers
3535-
// will still miss some information in this representation, because we don't
3536-
// provide enough context in the Subst* nodes in order to tell different
3537-
// template type alias specializations apart.
3532+
// Only substitute for the innermost template argument list.
35383533
MultiLevelTemplateArgumentList TemplateArgLists;
3539-
TemplateArgLists.addOuterTemplateArguments(
3540-
Template, CTAI.SugaredConverted,
3541-
/*Final=*/!getLangOpts().RetainSubstTemplateTypeParmTypeAstNodes);
3534+
TemplateArgLists.addOuterTemplateArguments(Template, CTAI.SugaredConverted,
3535+
/*Final=*/true);
35423536
TemplateArgLists.addOuterRetainedLevels(
35433537
AliasTemplate->getTemplateParameters()->getDepth());
35443538

clang/test/AST/ast-dump-retain-subst-template-type-parm-type-ast-nodes.cpp

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)