Skip to content

Commit 40bf77d

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

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
@@ -3531,16 +3531,10 @@ QualType Sema::CheckTemplateIdType(TemplateName Name,
35313531
if (Pattern->isInvalidDecl())
35323532
return QualType();
35333533

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

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)