Skip to content

Commit

Permalink
[clang][NFC] Refactor TagTypeKind (#71160)
Browse files Browse the repository at this point in the history
This patch converts TagTypeKind into scoped enum. Among other benefits,
this allows us to forward-declare it where necessary.
  • Loading branch information
Endilll committed Nov 3, 2023
1 parent 9dfdbd7 commit edd690b
Show file tree
Hide file tree
Showing 65 changed files with 486 additions and 403 deletions.
14 changes: 7 additions & 7 deletions clang-tools-extra/clang-doc/BitcodeReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ llvm::Error decodeRecord(const Record &R, AccessSpecifier &Field,

llvm::Error decodeRecord(const Record &R, TagTypeKind &Field,
llvm::StringRef Blob) {
switch (R[0]) {
case TTK_Struct:
case TTK_Interface:
case TTK_Union:
case TTK_Class:
case TTK_Enum:
Field = (TagTypeKind)R[0];
switch (static_cast<TagTypeKind>(R[0])) {
case TagTypeKind::Struct:
case TagTypeKind::Interface:
case TagTypeKind::Union:
case TagTypeKind::Class:
case TagTypeKind::Enum:
Field = static_cast<TagTypeKind>(R[0]);
return llvm::Error::success();
default:
return llvm::createStringError(llvm::inconvertibleErrorCode(),
Expand Down
4 changes: 2 additions & 2 deletions clang-tools-extra/clang-doc/BitcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ void ClangDocBitcodeWriter::emitBlock(const RecordInfo &I) {
emitRecord(*I.DefLoc, RECORD_DEFLOCATION);
for (const auto &L : I.Loc)
emitRecord(L, RECORD_LOCATION);
emitRecord(I.TagType, RECORD_TAG_TYPE);
emitRecord(llvm::to_underlying(I.TagType), RECORD_TAG_TYPE);
emitRecord(I.IsTypeDef, RECORD_IS_TYPE_DEF);
for (const auto &N : I.Members)
emitBlock(N);
Expand All @@ -578,7 +578,7 @@ void ClangDocBitcodeWriter::emitBlock(const BaseRecordInfo &I) {
emitRecord(I.USR, BASE_RECORD_USR);
emitRecord(I.Name, BASE_RECORD_NAME);
emitRecord(I.Path, BASE_RECORD_PATH);
emitRecord(I.TagType, BASE_RECORD_TAG_TYPE);
emitRecord(llvm::to_underlying(I.TagType), BASE_RECORD_TAG_TYPE);
emitRecord(I.IsVirtual, BASE_RECORD_IS_VIRTUAL);
emitRecord(I.Access, BASE_RECORD_ACCESS);
emitRecord(I.IsParent, BASE_RECORD_IS_PARENT);
Expand Down
10 changes: 5 additions & 5 deletions clang-tools-extra/clang-doc/Generators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ findGeneratorByName(llvm::StringRef Format) {

std::string getTagType(TagTypeKind AS) {
switch (AS) {
case TagTypeKind::TTK_Class:
case TagTypeKind::Class:
return "class";
case TagTypeKind::TTK_Union:
case TagTypeKind::Union:
return "union";
case TagTypeKind::TTK_Interface:
case TagTypeKind::Interface:
return "interface";
case TagTypeKind::TTK_Struct:
case TagTypeKind::Struct:
return "struct";
case TagTypeKind::TTK_Enum:
case TagTypeKind::Enum:
return "enum";
}
llvm_unreachable("Unknown TagTypeKind");
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/Representation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ RecordInfo::RecordInfo(SymbolID USR, StringRef Name, StringRef Path)

void RecordInfo::merge(RecordInfo &&Other) {
assert(mergeable(Other));
if (!TagType)
if (!llvm::to_underlying(TagType))
TagType = Other.TagType;
IsTypeDef = IsTypeDef || Other.IsTypeDef;
if (Members.empty())
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/clang-doc/Representation.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ struct RecordInfo : public SymbolInfo {
void merge(RecordInfo &&I);

// Type of this record (struct, class, union, interface).
TagTypeKind TagType = TagTypeKind::TTK_Struct;
TagTypeKind TagType = TagTypeKind::Struct;

// Full qualified name of this record, including namespaces and template
// specializations.
Expand Down
10 changes: 5 additions & 5 deletions clang-tools-extra/clang-doc/YAMLGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ template <> struct ScalarEnumerationTraits<clang::AccessSpecifier> {

template <> struct ScalarEnumerationTraits<clang::TagTypeKind> {
static void enumeration(IO &IO, clang::TagTypeKind &Value) {
IO.enumCase(Value, "Struct", clang::TagTypeKind::TTK_Struct);
IO.enumCase(Value, "Interface", clang::TagTypeKind::TTK_Interface);
IO.enumCase(Value, "Union", clang::TagTypeKind::TTK_Union);
IO.enumCase(Value, "Class", clang::TagTypeKind::TTK_Class);
IO.enumCase(Value, "Enum", clang::TagTypeKind::TTK_Enum);
IO.enumCase(Value, "Struct", clang::TagTypeKind::Struct);
IO.enumCase(Value, "Interface", clang::TagTypeKind::Interface);
IO.enumCase(Value, "Union", clang::TagTypeKind::Union);
IO.enumCase(Value, "Class", clang::TagTypeKind::Class);
IO.enumCase(Value, "Enum", clang::TagTypeKind::Enum);
}
};

Expand Down
3 changes: 2 additions & 1 deletion clang-tools-extra/clangd/refactor/InsertionPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ SourceLocation endLoc(const DeclContext &DC) {
}

AccessSpecifier getAccessAtEnd(const CXXRecordDecl &C) {
AccessSpecifier Spec = (C.getTagKind() == TTK_Class ? AS_private : AS_public);
AccessSpecifier Spec =
(C.getTagKind() == TagTypeKind::Class ? AS_private : AS_public);
for (const auto *D : C.decls())
if (const auto *ASD = llvm::dyn_cast<AccessSpecDecl>(D))
Spec = ASD->getAccess();
Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ TEST(BitcodeTest, emitRecordInfoBitcode) {
I.Loc.emplace_back(12, llvm::SmallString<16>{"test.cpp"});

I.Members.emplace_back(TypeInfo("int"), "X", AccessSpecifier::AS_private);
I.TagType = TagTypeKind::TTK_Class;
I.TagType = TagTypeKind::Class;
I.IsTypeDef = true;
I.Bases.emplace_back(EmptySID, "F", "path/to/F", true,
AccessSpecifier::AS_public, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TEST(HTMLGeneratorTest, emitRecordHTML) {
SmallString<16> PathTo;
llvm::sys::path::native("path/to", PathTo);
I.Members.emplace_back(TypeInfo("int"), "X", AccessSpecifier::AS_private);
I.TagType = TagTypeKind::TTK_Class;
I.TagType = TagTypeKind::Class;
I.Parents.emplace_back(EmptySID, "F", InfoType::IT_record, "F", PathTo);
I.VirtualParents.emplace_back(EmptySID, "G", InfoType::IT_record);

Expand Down
2 changes: 1 addition & 1 deletion clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ TEST(MDGeneratorTest, emitRecordMD) {
I.Loc.emplace_back(12, llvm::SmallString<16>{"test.cpp"});

I.Members.emplace_back(TypeInfo("int"), "X", AccessSpecifier::AS_private);
I.TagType = TagTypeKind::TTK_Class;
I.TagType = TagTypeKind::Class;
I.Parents.emplace_back(EmptySID, "F", InfoType::IT_record);
I.VirtualParents.emplace_back(EmptySID, "G", InfoType::IT_record);

Expand Down
6 changes: 3 additions & 3 deletions clang-tools-extra/unittests/clang-doc/MergeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ TEST(MergeTest, mergeRecordInfos) {
One.DefLoc = Location(10, llvm::SmallString<16>{"test.cpp"});

One.Members.emplace_back(TypeInfo("int"), "X", AccessSpecifier::AS_private);
One.TagType = TagTypeKind::TTK_Class;
One.TagType = TagTypeKind::Class;
One.Parents.emplace_back(EmptySID, "F", InfoType::IT_record);
One.VirtualParents.emplace_back(EmptySID, "G", InfoType::IT_record);

Expand All @@ -105,7 +105,7 @@ TEST(MergeTest, mergeRecordInfos) {

Two.Loc.emplace_back(12, llvm::SmallString<16>{"test.cpp"});

Two.TagType = TagTypeKind::TTK_Class;
Two.TagType = TagTypeKind::Class;

Two.Children.Records.emplace_back(NonEmptySID, "SharedChildStruct",
InfoType::IT_record, "path");
Expand All @@ -128,7 +128,7 @@ TEST(MergeTest, mergeRecordInfos) {

Expected->Members.emplace_back(TypeInfo("int"), "X",
AccessSpecifier::AS_private);
Expected->TagType = TagTypeKind::TTK_Class;
Expected->TagType = TagTypeKind::Class;
Expected->Parents.emplace_back(EmptySID, "F", InfoType::IT_record);
Expected->VirtualParents.emplace_back(EmptySID, "G", InfoType::IT_record);
Expected->Bases.emplace_back(EmptySID, "F", "path/to/F", true,
Expand Down
26 changes: 13 additions & 13 deletions clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ typedef struct {} G;)raw",
RecordInfo ExpectedE(EmptySID, /*Name=*/"E", /*Path=*/"GlobalNamespace");
ExpectedE.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedE.TagType = TagTypeKind::TTK_Class;
ExpectedE.TagType = TagTypeKind::Class;
ExpectedE.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedE.Members.emplace_back(TypeInfo("int"), "value",
AccessSpecifier::AS_public);
Expand Down Expand Up @@ -210,7 +210,7 @@ typedef struct {} G;)raw",
RecordInfo ExpectedF(EmptySID, /*Name=*/"F", /*Path=*/"GlobalNamespace");
ExpectedF.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedF.TagType = TagTypeKind::TTK_Struct;
ExpectedF.TagType = TagTypeKind::Struct;
ExpectedF.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
CheckRecordInfo(&ExpectedF, F);

Expand Down Expand Up @@ -253,7 +253,7 @@ typedef struct {} G;)raw",
RecordInfo ExpectedG(EmptySID, /*Name=*/"G", /*Path=*/"GlobalNamespace");
ExpectedG.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedG.TagType = TagTypeKind::TTK_Struct;
ExpectedG.TagType = TagTypeKind::Struct;
ExpectedG.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedG.IsTypeDef = true;
CheckRecordInfo(&ExpectedG, G);
Expand Down Expand Up @@ -295,7 +295,7 @@ TEST(SerializeTest, emitUndefinedRecordInfo) {
RecordInfo ExpectedE(EmptySID, /*Name=*/"E", /*Path=*/"GlobalNamespace");
ExpectedE.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedE.TagType = TagTypeKind::TTK_Class;
ExpectedE.TagType = TagTypeKind::Class;
ExpectedE.Loc.emplace_back(0, llvm::SmallString<16>{"test.cpp"});
CheckRecordInfo(&ExpectedE, E);
}
Expand All @@ -308,7 +308,7 @@ TEST(SerializeTest, emitRecordMemberInfo) {
RecordInfo ExpectedE(EmptySID, /*Name=*/"E", /*Path=*/"GlobalNamespace");
ExpectedE.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedE.TagType = TagTypeKind::TTK_Struct;
ExpectedE.TagType = TagTypeKind::Struct;
ExpectedE.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedE.Members.emplace_back(TypeInfo("int"), "I",
AccessSpecifier::AS_public);
Expand All @@ -324,15 +324,15 @@ TEST(SerializeTest, emitInternalRecordInfo) {
ExpectedE.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedE.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedE.TagType = TagTypeKind::TTK_Class;
ExpectedE.TagType = TagTypeKind::Class;
CheckRecordInfo(&ExpectedE, E);

RecordInfo *G = InfoAsRecord(Infos[2].get());
llvm::SmallString<128> ExpectedGPath("GlobalNamespace/E");
llvm::sys::path::native(ExpectedGPath);
RecordInfo ExpectedG(EmptySID, /*Name=*/"G", /*Path=*/ExpectedGPath);
ExpectedG.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedG.TagType = TagTypeKind::TTK_Class;
ExpectedG.TagType = TagTypeKind::Class;
ExpectedG.Namespace.emplace_back(EmptySID, "E", InfoType::IT_record);
ExpectedG.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
Expand Down Expand Up @@ -391,15 +391,15 @@ class J : public I<int> {} ;)raw",
RecordInfo ExpectedF(EmptySID, /*Name=*/"F", /*Path=*/"GlobalNamespace");
ExpectedF.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace, "");
ExpectedF.TagType = TagTypeKind::TTK_Class;
ExpectedF.TagType = TagTypeKind::Class;
ExpectedF.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
CheckRecordInfo(&ExpectedF, F);

RecordInfo *G = InfoAsRecord(Infos[3].get());
RecordInfo ExpectedG(EmptySID, /*Name=*/"G", /*Path=*/"GlobalNamespace");
ExpectedG.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedG.TagType = TagTypeKind::TTK_Class;
ExpectedG.TagType = TagTypeKind::Class;
ExpectedG.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedG.Members.emplace_back(TypeInfo("int"), "I",
AccessSpecifier::AS_protected);
Expand Down Expand Up @@ -446,14 +446,14 @@ class J : public I<int> {} ;)raw",
ExpectedE.Bases.back().Members.emplace_back(TypeInfo("int"), "I",
AccessSpecifier::AS_private);
ExpectedE.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedE.TagType = TagTypeKind::TTK_Class;
ExpectedE.TagType = TagTypeKind::Class;
CheckRecordInfo(&ExpectedE, E);

RecordInfo *H = InfoAsRecord(Infos[8].get());
RecordInfo ExpectedH(EmptySID, /*Name=*/"H", /*Path=*/"GlobalNamespace");
ExpectedH.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedH.TagType = TagTypeKind::TTK_Class;
ExpectedH.TagType = TagTypeKind::Class;
ExpectedH.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedH.Parents.emplace_back(EmptySID, /*Name=*/"E", InfoType::IT_record,
/*QualName=*/"E", /*Path=*/"GlobalNamespace");
Expand Down Expand Up @@ -500,7 +500,7 @@ class J : public I<int> {} ;)raw",
RecordInfo ExpectedI(EmptySID, /*Name=*/"I", /*Path=*/"GlobalNamespace");
ExpectedI.Namespace.emplace_back(EmptySID, "GlobalNamespace",
InfoType::IT_namespace);
ExpectedI.TagType = TagTypeKind::TTK_Class;
ExpectedI.TagType = TagTypeKind::Class;
ExpectedI.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
CheckRecordInfo(&ExpectedI, I);

Expand All @@ -514,7 +514,7 @@ class J : public I<int> {} ;)raw",
/*Path=*/"GlobalNamespace", false,
AccessSpecifier::AS_public, true);
ExpectedJ.DefLoc = Location(0, llvm::SmallString<16>{"test.cpp"});
ExpectedJ.TagType = TagTypeKind::TTK_Class;
ExpectedJ.TagType = TagTypeKind::Class;
CheckRecordInfo(&ExpectedJ, J);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ TEST(YAMLGeneratorTest, emitRecordYAML) {
Brief->Children.back()->Text = "Value of the thing.";
I.Members.back().Description.push_back(std::move(TopComment));

I.TagType = TagTypeKind::TTK_Class;
I.TagType = TagTypeKind::Class;
I.Bases.emplace_back(EmptySID, "F", "path/to/F", true,
AccessSpecifier::AS_public, true);
I.Bases.back().Children.Functions.emplace_back();
Expand Down
5 changes: 3 additions & 2 deletions clang/include/clang/AST/ASTContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,9 @@ class ASTContext : public RefCountedBase<ASTContext> {

/// Create a new implicit TU-level CXXRecordDecl or RecordDecl
/// declaration.
RecordDecl *buildImplicitRecord(StringRef Name,
RecordDecl::TagKind TK = TTK_Struct) const;
RecordDecl *buildImplicitRecord(
StringRef Name,
RecordDecl::TagKind TK = RecordDecl::TagKind::Struct) const;

/// Create a new implicit TU-level typedef declaration.
TypedefDecl *buildImplicitTypedef(QualType T, StringRef Name) const;
Expand Down
14 changes: 8 additions & 6 deletions clang/include/clang/AST/Decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3703,13 +3703,15 @@ class TagDecl : public TypeDecl,
return static_cast<TagKind>(TagDeclBits.TagDeclKind);
}

void setTagKind(TagKind TK) { TagDeclBits.TagDeclKind = TK; }
void setTagKind(TagKind TK) {
TagDeclBits.TagDeclKind = llvm::to_underlying(TK);
}

bool isStruct() const { return getTagKind() == TTK_Struct; }
bool isInterface() const { return getTagKind() == TTK_Interface; }
bool isClass() const { return getTagKind() == TTK_Class; }
bool isUnion() const { return getTagKind() == TTK_Union; }
bool isEnum() const { return getTagKind() == TTK_Enum; }
bool isStruct() const { return getTagKind() == TagTypeKind::Struct; }
bool isInterface() const { return getTagKind() == TagTypeKind::Interface; }
bool isClass() const { return getTagKind() == TagTypeKind::Class; }
bool isUnion() const { return getTagKind() == TagTypeKind::Union; }
bool isEnum() const { return getTagKind() == TagTypeKind::Enum; }

/// Is this tag type named, either directly or via being defined in
/// a typedef of this type?
Expand Down
12 changes: 6 additions & 6 deletions clang/include/clang/AST/Type.h
Original file line number Diff line number Diff line change
Expand Up @@ -5718,21 +5718,21 @@ enum class ElaboratedTypeKeyword {
};

/// The kind of a tag type.
enum TagTypeKind {
enum class TagTypeKind {
/// The "struct" keyword.
TTK_Struct,
Struct,

/// The "__interface" keyword.
TTK_Interface,
Interface,

/// The "union" keyword.
TTK_Union,
Union,

/// The "class" keyword.
TTK_Class,
Class,

/// The "enum" keyword.
TTK_Enum
Enum
};

/// A helper class for Type nodes having an ElaboratedTypeKeyword.
Expand Down
12 changes: 6 additions & 6 deletions clang/lib/AST/ASTContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6525,12 +6525,12 @@ bool ASTContext::isSameEntity(const NamedDecl *X, const NamedDecl *Y) const {
if (const auto *TagX = dyn_cast<TagDecl>(X)) {
const auto *TagY = cast<TagDecl>(Y);
return (TagX->getTagKind() == TagY->getTagKind()) ||
((TagX->getTagKind() == TTK_Struct ||
TagX->getTagKind() == TTK_Class ||
TagX->getTagKind() == TTK_Interface) &&
(TagY->getTagKind() == TTK_Struct ||
TagY->getTagKind() == TTK_Class ||
TagY->getTagKind() == TTK_Interface));
((TagX->getTagKind() == TagTypeKind::Struct ||
TagX->getTagKind() == TagTypeKind::Class ||
TagX->getTagKind() == TagTypeKind::Interface) &&
(TagY->getTagKind() == TagTypeKind::Struct ||
TagY->getTagKind() == TagTypeKind::Class ||
TagY->getTagKind() == TagTypeKind::Interface));
}

// Functions with the same type and linkage match.
Expand Down
12 changes: 6 additions & 6 deletions clang/lib/AST/Decl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4639,8 +4639,8 @@ TagDecl::TagDecl(Kind DK, TagKind TK, const ASTContext &C, DeclContext *DC,
SourceLocation StartL)
: TypeDecl(DK, DC, L, Id, StartL), DeclContext(DK), redeclarable_base(C),
TypedefNameDeclOrQualifier((TypedefNameDecl *)nullptr) {
assert((DK != Enum || TK == TTK_Enum) &&
"EnumDecl not matched with TTK_Enum");
assert((DK != Enum || TK == TagTypeKind::Enum) &&
"EnumDecl not matched with TagTypeKind::Enum");
setPreviousDecl(PrevDecl);
setTagKind(TK);
setCompleteDefinition(false);
Expand Down Expand Up @@ -4773,7 +4773,7 @@ void TagDecl::setTemplateParameterListsInfo(
EnumDecl::EnumDecl(ASTContext &C, DeclContext *DC, SourceLocation StartLoc,
SourceLocation IdLoc, IdentifierInfo *Id, EnumDecl *PrevDecl,
bool Scoped, bool ScopedUsingClassTag, bool Fixed)
: TagDecl(Enum, TTK_Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) {
: TagDecl(Enum, TagTypeKind::Enum, C, DC, IdLoc, Id, PrevDecl, StartLoc) {
assert(Scoped || !ScopedUsingClassTag);
IntegerType = nullptr;
setNumPositiveBits(0);
Expand Down Expand Up @@ -4962,9 +4962,9 @@ RecordDecl *RecordDecl::Create(const ASTContext &C, TagKind TK, DeclContext *DC,
}

RecordDecl *RecordDecl::CreateDeserialized(const ASTContext &C, unsigned ID) {
RecordDecl *R =
new (C, ID) RecordDecl(Record, TTK_Struct, C, nullptr, SourceLocation(),
SourceLocation(), nullptr, nullptr);
RecordDecl *R = new (C, ID)
RecordDecl(Record, TagTypeKind::Struct, C, nullptr, SourceLocation(),
SourceLocation(), nullptr, nullptr);
R->setMayHaveOutOfDateDef(C.getLangOpts().Modules);
return R;
}
Expand Down

0 comments on commit edd690b

Please sign in to comment.