Skip to content

Commit 5c02fe1

Browse files
committed
Revert "[Concepts] Placeholder constraints and abbreviated templates"
This reverts commit e57a9ab. Parser/cxx2a-placeholder-type-constraint.cpp has MSan failures. Present at 7b81c3f: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/17133/steps/check-clang%20msan/logs/stdio not present at eaa594f: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/17132/steps/check-clang%20msan/logs/stdio Stack trace: ``` ==57032==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0xccfe016 in clang::AutoTypeLoc::getLocalSourceRange() const /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/TypeLoc.h:2036:19 #1 0xcc56758 in CheckDeducedPlaceholderConstraints(clang::Sema&, clang::AutoType const&, clang::AutoTypeLoc, clang::QualType) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp:4505:56 #2 0xcc550ce in clang::Sema::DeduceAutoType(clang::TypeLoc, clang::Expr*&, clang::QualType&, llvm::Optional<unsigned int>, bool) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp:4707:11 #3 0xcc52407 in clang::Sema::DeduceAutoType(clang::TypeSourceInfo*, clang::Expr*&, clang::QualType&, llvm::Optional<unsigned int>, bool) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaTemplateDeduction.cpp:4457:10 #4 0xba38332 in clang::Sema::deduceVarTypeFromInitializer(clang::VarDecl*, clang::DeclarationName, clang::QualType, clang::TypeSourceInfo*, clang::SourceRange, bool, clang::Expr*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:11351:7 #5 0xba3a8a9 in clang::Sema::DeduceVariableDeclarationType(clang::VarDecl*, bool, clang::Expr*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:11385:26 #6 0xba3c520 in clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:11725:9 #7 0xb39c498 in clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2399:17 #8 0xb394d80 in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2128:21 #9 0xb383bbf in clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, bool, clang::Parser::ForRangeInit*, clang::SourceLocation*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:1848:10 #10 0xb383129 in clang::Parser::ParseDeclaration(clang::DeclaratorContext, clang::SourceLocation&, clang::Parser::ParsedAttributesWithRange&, clang::SourceLocation*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/ADT/PointerUnion.h #11 0xb53a388 in clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::Parser::ParsedAttributesWithRange&) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseStmt.cpp:221:13 #12 0xb539309 in clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseStmt.cpp:106:20 #13 0xb55610e in clang::Parser::ParseCompoundStatementBody(bool) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseStmt.cpp:1079:11 #14 0xb559529 in clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseStmt.cpp:2204:21 #15 0xb33c13e in clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/Parser.cpp:1339:10 #16 0xb394703 in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2068:11 #17 0xb338e52 in clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec&, clang::AccessSpecifier) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/Parser.cpp:1099:10 #18 0xb337674 in clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*, clang::AccessSpecifier) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/Parser.cpp:1115:12 #19 0xb334a96 in clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&, clang::ParsingDeclSpec*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/Parser.cpp:935:12 #20 0xb32f12a in clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/Parser.cpp:686:12 #21 0xb31e193 in clang::ParseAST(clang::Sema&, bool, bool) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Parse/ParseAST.cpp:158:20 #22 0x80263f0 in clang::FrontendAction::Execute() /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:936:8 #23 0x7f2a257 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:965:33 #24 0x8288bef in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:290:25 #25 0xad44c2 in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/tools/driver/cc1_main.cpp:239:15 #26 0xacd76a in ExecuteCC1Tool(llvm::ArrayRef<char const*>) /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/tools/driver/driver.cpp:325:12 #27 0xacc9fd in main /b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/tools/driver/driver.cpp:398:12 #28 0x7f7d82cdb2e0 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x202e0) #29 0xa4dde9 in _start (/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang-11+0xa4dde9) ```
1 parent a1e0b53 commit 5c02fe1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+362
-1869
lines changed

clang/include/clang/AST/ASTContext.h

+2-5
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class AtomicExpr;
8888
class BlockExpr;
8989
class BuiltinTemplateDecl;
9090
class CharUnits;
91-
class ConceptDecl;
9291
class CXXABI;
9392
class CXXConstructorDecl;
9493
class CXXMethodDecl;
@@ -212,7 +211,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
212211
mutable llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
213212
mutable llvm::FoldingSet<DependentUnaryTransformType>
214213
DependentUnaryTransformTypes;
215-
mutable llvm::ContextualFoldingSet<AutoType, ASTContext&> AutoTypes;
214+
mutable llvm::FoldingSet<AutoType> AutoTypes;
216215
mutable llvm::FoldingSet<DeducedTemplateSpecializationType>
217216
DeducedTemplateSpecializationTypes;
218217
mutable llvm::FoldingSet<AtomicType> AtomicTypes;
@@ -1543,9 +1542,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
15431542

15441543
/// C++11 deduced auto type.
15451544
QualType getAutoType(QualType DeducedType, AutoTypeKeyword Keyword,
1546-
bool IsDependent, bool IsPack = false,
1547-
ConceptDecl *TypeConstraintConcept = nullptr,
1548-
ArrayRef<TemplateArgument> TypeConstraintArgs ={}) const;
1545+
bool IsDependent, bool IsPack = false) const;
15491546

15501547
/// C++11 deduction pattern for 'auto' type.
15511548
QualType getAutoDeductType() const;

clang/include/clang/AST/ASTNodeTraverser.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,8 @@ class ASTNodeTraverser
548548
}
549549

550550
void VisitNonTypeTemplateParmDecl(const NonTypeTemplateParmDecl *D) {
551-
if (const auto *E = D->getPlaceholderTypeConstraint())
552-
Visit(E);
551+
if (const auto *TC = D->getPlaceholderTypeConstraint())
552+
Visit(TC->getImmediatelyDeclaredConstraint());
553553
if (D->hasDefaultArgument())
554554
Visit(D->getDefaultArgument(), SourceRange(),
555555
D->getDefaultArgStorage().getInheritedFrom(),

clang/include/clang/AST/DeclTemplate.h

+14-29
Original file line numberDiff line numberDiff line change
@@ -1102,17 +1102,6 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl {
11021102
/// template.
11031103
ArrayRef<TemplateArgument> getInjectedTemplateArgs();
11041104

1105-
/// Return whether this function template is an abbreviated function template,
1106-
/// e.g. `void foo(auto x)` or `template<typename T> void foo(auto x)`
1107-
bool isAbbreviated() const {
1108-
// Since the invented template parameters generated from 'auto' parameters
1109-
// are either appended to the end of the explicit template parameter list or
1110-
// form a new template paramter list, we can simply observe the last
1111-
// parameter to determine if such a thing happened.
1112-
const TemplateParameterList *TPL = getTemplateParameters();
1113-
return TPL->getParam(TPL->size() - 1)->isImplicit();
1114-
}
1115-
11161105
/// Merge \p Prev with our RedeclarableTemplateDecl::Common.
11171106
void mergePrevDecl(FunctionTemplateDecl *Prev);
11181107

@@ -1226,6 +1215,7 @@ class TemplateTypeParmDecl final : public TypeDecl,
12261215
bool ParameterPack,
12271216
bool HasTypeConstraint = false,
12281217
Optional<unsigned> NumExpanded = None);
1218+
12291219
static TemplateTypeParmDecl *CreateDeserialized(const ASTContext &C,
12301220
unsigned ID);
12311221
static TemplateTypeParmDecl *CreateDeserialized(const ASTContext &C,
@@ -1384,8 +1374,7 @@ class NonTypeTemplateParmDecl final
13841374
: public DeclaratorDecl,
13851375
protected TemplateParmPosition,
13861376
private llvm::TrailingObjects<NonTypeTemplateParmDecl,
1387-
std::pair<QualType, TypeSourceInfo *>,
1388-
Expr *> {
1377+
std::pair<QualType, TypeSourceInfo *>> {
13891378
friend class ASTDeclReader;
13901379
friend TrailingObjects;
13911380

@@ -1440,12 +1429,10 @@ class NonTypeTemplateParmDecl final
14401429
ArrayRef<TypeSourceInfo *> ExpandedTInfos);
14411430

14421431
static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C,
1443-
unsigned ID,
1444-
bool HasTypeConstraint);
1432+
unsigned ID);
14451433
static NonTypeTemplateParmDecl *CreateDeserialized(ASTContext &C,
14461434
unsigned ID,
1447-
unsigned NumExpandedTypes,
1448-
bool HasTypeConstraint);
1435+
unsigned NumExpandedTypes);
14491436

14501437
using TemplateParmPosition::getDepth;
14511438
using TemplateParmPosition::setDepth;
@@ -1556,22 +1543,20 @@ class NonTypeTemplateParmDecl final
15561543
return TypesAndInfos[I].second;
15571544
}
15581545

1559-
/// Return the constraint introduced by the placeholder type of this non-type
1546+
/// Return the type-constraint in the placeholder type of this non-type
15601547
/// template parameter (if any).
1561-
Expr *getPlaceholderTypeConstraint() const {
1562-
return hasPlaceholderTypeConstraint() ? *getTrailingObjects<Expr *>() :
1563-
nullptr;
1564-
}
1565-
1566-
void setPlaceholderTypeConstraint(Expr *E) {
1567-
*getTrailingObjects<Expr *>() = E;
1548+
TypeConstraint *getPlaceholderTypeConstraint() const {
1549+
// TODO: Concepts: Implement once we have actual placeholders with type
1550+
// constraints.
1551+
return nullptr;
15681552
}
15691553

15701554
/// Determine whether this non-type template parameter's type has a
15711555
/// placeholder with a type-constraint.
15721556
bool hasPlaceholderTypeConstraint() const {
1573-
auto *AT = getType()->getContainedAutoType();
1574-
return AT && AT->isConstrained();
1557+
// TODO: Concepts: Implement once we have actual placeholders with type
1558+
// constraints.
1559+
return false;
15751560
}
15761561

15771562
/// \brief Get the associated-constraints of this template parameter.
@@ -1581,8 +1566,8 @@ class NonTypeTemplateParmDecl final
15811566
/// Use this instead of getPlaceholderImmediatelyDeclaredConstraint for
15821567
/// concepts APIs that accept an ArrayRef of constraint expressions.
15831568
void getAssociatedConstraints(llvm::SmallVectorImpl<const Expr *> &AC) const {
1584-
if (Expr *E = getPlaceholderTypeConstraint())
1585-
AC.push_back(E);
1569+
if (TypeConstraint *TC = getPlaceholderTypeConstraint())
1570+
AC.push_back(TC->getImmediatelyDeclaredConstraint());
15861571
}
15871572

15881573
// Implement isa/cast/dyncast/etc.

clang/include/clang/AST/PropertiesBase.td

-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ def DeclRef : RefPropertyType<"Decl"> { let ConstWhenWriting = 1; }
9999
SubclassPropertyType<"TagDecl", DeclRef>;
100100
def TemplateDeclRef :
101101
SubclassPropertyType<"TemplateDecl", DeclRef>;
102-
def ConceptDeclRef :
103-
SubclassPropertyType<"ConceptDecl", DeclRef>;
104102
def TemplateTypeParmDeclRef :
105103
SubclassPropertyType<"TemplateTypeParmDecl", DeclRef>;
106104
def TemplateTemplateParmDeclRef :

clang/include/clang/AST/RecursiveASTVisitor.h

+1-13
Original file line numberDiff line numberDiff line change
@@ -1040,13 +1040,7 @@ DEF_TRAVERSE_TYPE(UnaryTransformType, {
10401040
TRY_TO(TraverseType(T->getUnderlyingType()));
10411041
})
10421042

1043-
DEF_TRAVERSE_TYPE(AutoType, {
1044-
TRY_TO(TraverseType(T->getDeducedType()));
1045-
if (T->isConstrained()) {
1046-
TRY_TO(TraverseDecl(T->getTypeConstraintConcept()));
1047-
TRY_TO(TraverseTemplateArguments(T->getArgs(), T->getNumArgs()));
1048-
}
1049-
})
1043+
DEF_TRAVERSE_TYPE(AutoType, { TRY_TO(TraverseType(T->getDeducedType())); })
10501044
DEF_TRAVERSE_TYPE(DeducedTemplateSpecializationType, {
10511045
TRY_TO(TraverseTemplateName(T->getTemplateName()));
10521046
TRY_TO(TraverseType(T->getDeducedType()));
@@ -1293,12 +1287,6 @@ DEF_TRAVERSE_TYPELOC(UnaryTransformType, {
12931287

12941288
DEF_TRAVERSE_TYPELOC(AutoType, {
12951289
TRY_TO(TraverseType(TL.getTypePtr()->getDeducedType()));
1296-
if (TL.isConstrained()) {
1297-
TRY_TO(TraverseNestedNameSpecifierLoc(TL.getNestedNameSpecifierLoc()));
1298-
TRY_TO(TraverseDeclarationNameInfo(TL.getConceptNameInfo()));
1299-
for (unsigned I = 0, E = TL.getNumArgs(); I != E; ++I)
1300-
TRY_TO(TraverseTemplateArgumentLoc(TL.getArgLoc(I)));
1301-
}
13021290
})
13031291

13041292
DEF_TRAVERSE_TYPELOC(DeducedTemplateSpecializationType, {

clang/include/clang/AST/TemplateBase.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ struct ASTTemplateArgumentListInfo final
637637
}
638638

639639
static const ASTTemplateArgumentListInfo *
640-
Create(const ASTContext &C, const TemplateArgumentListInfo &List);
640+
Create(ASTContext &C, const TemplateArgumentListInfo &List);
641641
};
642642

643643
/// Represents an explicit template argument list in C++, e.g.,
@@ -702,11 +702,6 @@ inline const TemplateArgument &
702702
return getArgs()[Idx];
703703
}
704704

705-
inline const TemplateArgument &AutoType::getArg(unsigned Idx) const {
706-
assert(Idx < getNumArgs() && "Template argument out of range");
707-
return getArgs()[Idx];
708-
}
709-
710705
} // namespace clang
711706

712707
#endif // LLVM_CLANG_AST_TEMPLATEBASE_H

clang/include/clang/AST/Type.h

+18-56
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ namespace clang {
5858

5959
class ExtQuals;
6060
class QualType;
61-
class ConceptDecl;
6261
class TagDecl;
6362
class Type;
6463

@@ -1684,15 +1683,6 @@ class alignas(8) Type : public ExtQualsTypeCommonBase {
16841683
/// Was this placeholder type spelled as 'auto', 'decltype(auto)',
16851684
/// or '__auto_type'? AutoTypeKeyword value.
16861685
unsigned Keyword : 2;
1687-
1688-
/// The number of template arguments in the type-constraints, which is
1689-
/// expected to be able to hold at least 1024 according to [implimits].
1690-
/// However as this limit is somewhat easy to hit with template
1691-
/// metaprogramming we'd prefer to keep it as large as possible.
1692-
/// At the moment it has been left as a non-bitfield since this type
1693-
/// safely fits in 64 bits as an unsigned, so there is no reason to
1694-
/// introduce the performance impact of a bitfield.
1695-
unsigned NumArgs;
16961686
};
16971687

16981688
class SubstTemplateTypeParmPackTypeBitfields {
@@ -4824,7 +4814,8 @@ class SubstTemplateTypeParmPackType : public Type, public llvm::FoldingSetNode {
48244814

48254815
/// Common base class for placeholders for types that get replaced by
48264816
/// placeholder type deduction: C++11 auto, C++14 decltype(auto), C++17 deduced
4827-
/// class template types, and constrained type names.
4817+
/// class template types, and (eventually) constrained type names from the C++
4818+
/// Concepts TS.
48284819
///
48294820
/// These types are usually a placeholder for a deduced type. However, before
48304821
/// the initializer is attached, or (usually) if the initializer is
@@ -4869,50 +4860,18 @@ class DeducedType : public Type {
48694860
}
48704861
};
48714862

4872-
/// Represents a C++11 auto or C++14 decltype(auto) type, possibly constrained
4873-
/// by a type-constraint.
4874-
class alignas(8) AutoType : public DeducedType, public llvm::FoldingSetNode {
4863+
/// Represents a C++11 auto or C++14 decltype(auto) type.
4864+
class AutoType : public DeducedType, public llvm::FoldingSetNode {
48754865
friend class ASTContext; // ASTContext creates these
48764866

4877-
ConceptDecl *TypeConstraintConcept;
4878-
48794867
AutoType(QualType DeducedAsType, AutoTypeKeyword Keyword,
4880-
bool IsDeducedAsDependent, bool IsDeducedAsPack, ConceptDecl *CD,
4881-
ArrayRef<TemplateArgument> TypeConstraintArgs);
4882-
4883-
const TemplateArgument *getArgBuffer() const {
4884-
return reinterpret_cast<const TemplateArgument*>(this+1);
4885-
}
4886-
4887-
TemplateArgument *getArgBuffer() {
4888-
return reinterpret_cast<TemplateArgument*>(this+1);
4868+
bool IsDeducedAsDependent, bool IsDeducedAsPack)
4869+
: DeducedType(Auto, DeducedAsType, IsDeducedAsDependent,
4870+
IsDeducedAsDependent, IsDeducedAsPack) {
4871+
AutoTypeBits.Keyword = (unsigned)Keyword;
48894872
}
48904873

48914874
public:
4892-
/// Retrieve the template arguments.
4893-
const TemplateArgument *getArgs() const {
4894-
return getArgBuffer();
4895-
}
4896-
4897-
/// Retrieve the number of template arguments.
4898-
unsigned getNumArgs() const {
4899-
return AutoTypeBits.NumArgs;
4900-
}
4901-
4902-
const TemplateArgument &getArg(unsigned Idx) const; // in TemplateBase.h
4903-
4904-
ArrayRef<TemplateArgument> getTypeConstraintArguments() const {
4905-
return {getArgs(), getNumArgs()};
4906-
}
4907-
4908-
ConceptDecl *getTypeConstraintConcept() const {
4909-
return TypeConstraintConcept;
4910-
}
4911-
4912-
bool isConstrained() const {
4913-
return TypeConstraintConcept != nullptr;
4914-
}
4915-
49164875
bool isDecltypeAuto() const {
49174876
return getKeyword() == AutoTypeKeyword::DecltypeAuto;
49184877
}
@@ -4921,15 +4880,18 @@ class alignas(8) AutoType : public DeducedType, public llvm::FoldingSetNode {
49214880
return (AutoTypeKeyword)AutoTypeBits.Keyword;
49224881
}
49234882

4924-
void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context) {
4925-
Profile(ID, Context, getDeducedType(), getKeyword(), isDependentType(),
4926-
getTypeConstraintConcept(), getTypeConstraintArguments());
4883+
void Profile(llvm::FoldingSetNodeID &ID) {
4884+
Profile(ID, getDeducedType(), getKeyword(), isDependentType(),
4885+
containsUnexpandedParameterPack());
49274886
}
49284887

4929-
static void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &Context,
4930-
QualType Deduced, AutoTypeKeyword Keyword,
4931-
bool IsDependent, ConceptDecl *CD,
4932-
ArrayRef<TemplateArgument> Arguments);
4888+
static void Profile(llvm::FoldingSetNodeID &ID, QualType Deduced,
4889+
AutoTypeKeyword Keyword, bool IsDependent, bool IsPack) {
4890+
ID.AddPointer(Deduced.getAsOpaquePtr());
4891+
ID.AddInteger((unsigned)Keyword);
4892+
ID.AddBoolean(IsDependent);
4893+
ID.AddBoolean(IsPack);
4894+
}
49334895

49344896
static bool classof(const Type *T) {
49354897
return T->getTypeClass() == Auto;

0 commit comments

Comments
 (0)