Skip to content

Commit 53d24e0

Browse files
committed
fixup! [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments
reformat the code
1 parent a68fcab commit 53d24e0

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

clang/lib/AST/ASTContext.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,8 +1170,7 @@ ASTContext::getTypePackElementDecl() const {
11701170
return TypePackElementDecl;
11711171
}
11721172

1173-
BuiltinTemplateDecl *
1174-
ASTContext::getTypeListDedupDecl() const {
1173+
BuiltinTemplateDecl *ASTContext::getTypeListDedupDecl() const {
11751174
if (!TypeListDedupDecl)
11761175
TypeListDedupDecl =
11771176
buildBuiltinTemplateDecl(BTK__type_list_dedup, getTypeListDedupName());

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3181,10 +3181,9 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD,
31813181
if (!Seen.insert(T.getAsType().getCanonicalType()).second)
31823182
continue;
31833183
SyntheticTemplateArgs.addArgument(TemplateArgumentLoc(
3184-
TemplateArgument(T),
3185-
SemaRef.Context.getTrivialTypeSourceInfo(
3186-
T.getAsType(),
3187-
/*FIXME: add location*/ SourceLocation())));
3184+
TemplateArgument(T), SemaRef.Context.getTrivialTypeSourceInfo(
3185+
T.getAsType(),
3186+
/*FIXME: add location*/ SourceLocation())));
31883187
}
31893188
return SemaRef.CheckTemplateIdType(Template.getAsTemplate(), TemplateLoc,
31903189
SyntheticTemplateArgs);

clang/lib/Serialization/ASTWriter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5052,8 +5052,7 @@ void ASTWriter::PrepareWritingSpecialDecls(Sema &SemaRef) {
50525052
PREDEF_DECL_CF_CONSTANT_STRING_TAG_ID);
50535053
RegisterPredefDecl(Context.TypePackElementDecl,
50545054
PREDEF_DECL_TYPE_PACK_ELEMENT_ID);
5055-
RegisterPredefDecl(Context.TypeListDedupDecl,
5056-
PREDEF_DECL_TYPE_LIST_DEDUP_ID);
5055+
RegisterPredefDecl(Context.TypeListDedupDecl, PREDEF_DECL_TYPE_LIST_DEDUP_ID);
50575056

50585057
const TranslationUnitDecl *TU = Context.getTranslationUnitDecl();
50595058

0 commit comments

Comments
 (0)