|
39 | 39 | #include "llvm/ADT/SmallBitVector.h" |
40 | 40 | #include "llvm/ADT/SmallString.h" |
41 | 41 | #include "llvm/ADT/StringExtras.h" |
42 | | -#include "llvm/Support/SaveAndRestore.h" |
43 | 42 |
|
44 | 43 | #include <iterator> |
45 | 44 | #include <optional> |
@@ -3991,14 +3990,9 @@ QualType Sema::CheckTemplateIdType(TemplateName Name, |
3991 | 3990 | if (Inst.isInvalid()) |
3992 | 3991 | return QualType(); |
3993 | 3992 |
|
3994 | | - { |
3995 | | - Sema::ContextRAII SavedContext(*this, Pattern->getDeclContext()); |
3996 | | - if (RebuildingTypesInCurrentInstantiation) |
3997 | | - SavedContext.pop(); |
3998 | | - CanonType = |
3999 | | - SubstType(Pattern->getUnderlyingType(), TemplateArgLists, |
4000 | | - AliasTemplate->getLocation(), AliasTemplate->getDeclName()); |
4001 | | - } |
| 3993 | + CanonType = SubstType(Pattern->getUnderlyingType(), |
| 3994 | + TemplateArgLists, AliasTemplate->getLocation(), |
| 3995 | + AliasTemplate->getDeclName()); |
4002 | 3996 | if (CanonType.isNull()) { |
4003 | 3997 | // If this was enable_if and we failed to find the nested type |
4004 | 3998 | // within enable_if in a SFINAE context, dig out the specific |
@@ -11398,8 +11392,6 @@ TypeSourceInfo *Sema::RebuildTypeInCurrentInstantiation(TypeSourceInfo *T, |
11398 | 11392 | if (!T || !T->getType()->isInstantiationDependentType()) |
11399 | 11393 | return T; |
11400 | 11394 |
|
11401 | | - llvm::SaveAndRestore DisableContextSwitchForTypeAliases( |
11402 | | - RebuildingTypesInCurrentInstantiation, true); |
11403 | 11395 | CurrentInstantiationRebuilder Rebuilder(*this, Loc, Name); |
11404 | 11396 | return Rebuilder.TransformType(T); |
11405 | 11397 | } |
|
0 commit comments