Skip to content

Commit

Permalink
chore: rename VarInfo to VariableInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
sdkrystian committed Jun 14, 2023
1 parent d9ad26f commit 711baf4
Show file tree
Hide file tree
Showing 26 changed files with 43 additions and 43 deletions.
6 changes: 3 additions & 3 deletions include/mrdox/Corpus.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class MRDOX_VISIBLE
MRDOX_DECL virtual bool visit(FunctionInfo const&);
MRDOX_DECL virtual bool visit(TypedefInfo const&);
MRDOX_DECL virtual bool visit(EnumInfo const&);
MRDOX_DECL virtual bool visit(VarInfo const&);
MRDOX_DECL virtual bool visit(VariableInfo const&);
MRDOX_DECL virtual bool visit(FieldInfo const&);
MRDOX_DECL virtual bool visit(SpecializationInfo const&);
};
Expand Down Expand Up @@ -180,8 +180,8 @@ visit(
return;
case InfoKind::Variable:
if constexpr(std::is_invocable_v<F,
VarInfo const&, Args&&...>)
f(static_cast<VarInfo const&>(I),
VariableInfo const&, Args&&...>)
f(static_cast<VariableInfo const&>(I),
std::forward<Args>(args)...);
return;
case InfoKind::Specialization:
Expand Down
2 changes: 1 addition & 1 deletion include/mrdox/Metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
#include <mrdox/Metadata/Template.hpp>
#include <mrdox/Metadata/Type.hpp>
#include <mrdox/Metadata/Typedef.hpp>
#include <mrdox/Metadata/Var.hpp>
#include <mrdox/Metadata/Variable.hpp>

#endif
2 changes: 1 addition & 1 deletion include/mrdox/Metadata/Info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct RecordInfo;
struct FunctionInfo;
struct EnumInfo;
struct TypedefInfo;
struct VarInfo;
struct VariableInfo;
struct SpecializationInfo;

/** Common properties of all symbols
Expand Down
2 changes: 1 addition & 1 deletion include/mrdox/Metadata/Interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct MemberType

struct StaticDataMember
{
VarInfo const* I;
VariableInfo const* I;
RecordInfo const* From;
};

Expand Down
2 changes: 1 addition & 1 deletion include/mrdox/Metadata/Record.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <mrdox/Metadata/Symbols.hpp>
#include <mrdox/Metadata/Template.hpp>
#include <mrdox/Metadata/Typedef.hpp>
#include <mrdox/Metadata/Var.hpp>
#include <mrdox/Metadata/Variable.hpp>
#include <memory>
#include <string>
#include <string_view>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
namespace clang {
namespace mrdox {

union VarFlags0
union VariableFlags0
{
BitFieldFullValue raw;

Expand All @@ -35,7 +35,7 @@ union VarFlags0
This includes variables at namespace
scope, and static variables at class scope.
*/
struct VarInfo
struct VariableInfo
: IsInfo<InfoKind::Variable>
, SymbolInfo
{
Expand All @@ -44,22 +44,22 @@ struct VarInfo
/** The type of the variable */
TypeInfo Type;

VarFlags0 specs{.raw={0}};
VariableFlags0 specs{.raw={0}};

std::unique_ptr<TemplateInfo> Template;

//--------------------------------------------

explicit
VarInfo(
VariableInfo(
SymbolID ID = SymbolID::zero)
: IsInfo(ID)
{
}

private:
explicit
VarInfo(
VariableInfo(
std::unique_ptr<TemplateInfo>&& T)
: Template(std::move(T))
{
Expand Down
2 changes: 1 addition & 1 deletion include/mrdox/MetadataFwd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct SpecializedMember;
struct SymbolInfo;
struct TypeInfo;
struct TypedefInfo;
struct VarInfo;
struct VariableInfo;
struct VerbatimBlock;

struct TemplateInfo;
Expand Down
8 changes: 4 additions & 4 deletions source/-XML/CXXTags.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <mrdox/Metadata/Function.hpp>
#include <mrdox/Metadata/Record.hpp>
#include <mrdox/Metadata/Type.hpp>
#include <mrdox/Metadata/Var.hpp>
#include <mrdox/Metadata/Variable.hpp>
#include <mrdox/Platform.hpp>

/*
Expand Down Expand Up @@ -229,10 +229,10 @@ inline void write(FieldFlags const& bits, XMLTags& tags)
}


inline void write(VarFlags0 const& bits, XMLTags& tags)
inline void write(VariableFlags0 const& bits, XMLTags& tags)
{
BitFieldWriter<VarFlags0> fw(bits, tags);
fw.write(&VarFlags0::storageClass, "storage-class");
BitFieldWriter<VariableFlags0> fw(bits, tags);
fw.write(&VariableFlags0::storageClass, "storage-class");
}

inline void writeReturnType(TypeInfo const& I, XMLTags& tags)
Expand Down
4 changes: 2 additions & 2 deletions source/-XML/XMLWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ visit(
bool
XMLWriter::
visit(
VarInfo const& I)
VariableInfo const& I)
{
return writeVar(I);
}
Expand Down Expand Up @@ -444,7 +444,7 @@ writeField(
bool
XMLWriter::
writeVar(
VarInfo const& I)
VariableInfo const& I)
{
openTemplate(I.Template);

Expand Down
4 changes: 2 additions & 2 deletions source/-XML/XMLWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class XMLWriter
bool visit(FunctionInfo const&) override;
bool visit(TypedefInfo const&) override;
bool visit(EnumInfo const&) override;
bool visit(VarInfo const&) override;
bool visit(VariableInfo const&) override;
bool visit(SpecializationInfo const&) override;
bool visit(FieldInfo const&) override;

Expand All @@ -72,7 +72,7 @@ class XMLWriter
bool writeRecord(RecordInfo const&);
bool writeTypedef(TypedefInfo const&);
bool writeField(FieldInfo const&);
bool writeVar(VarInfo const&);
bool writeVar(VariableInfo const&);
bool writeSpecialization(const SpecializationInfo&);

void writeSymbol(SymbolInfo const& I);
Expand Down
2 changes: 1 addition & 1 deletion source/-adoc/AdocMultiPageWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ build(
void
AdocMultiPageWriter::
build(
VarInfo const& I)
VariableInfo const& I)
{
}

Expand Down
2 changes: 1 addition & 1 deletion source/-adoc/AdocMultiPageWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class AdocMultiPageWriter
void build(FunctionInfo const&);
void build(TypedefInfo const&);
void build(EnumInfo const&);
void build(VarInfo const&);
void build(VariableInfo const&);

void build(OverloadInfo const&);

Expand Down
4 changes: 2 additions & 2 deletions source/-adoc/AdocSinglePageWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ visit(
auto functionOverloads = makeNamespaceOverloads(I, corpus_);
auto typedefList = buildSortedList<TypedefInfo>(I.Members);
auto enumList = buildSortedList<EnumInfo>(I.Members);
auto variableList = buildSortedList<VarInfo>(I.Members);
auto variableList = buildSortedList<VariableInfo>(I.Members);

// don't emit empty namespaces,
// but still visit child namespaces.
Expand Down Expand Up @@ -272,7 +272,7 @@ visit(
bool
AdocSinglePageWriter::
visit(
VarInfo const&)
VariableInfo const&)
{
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion source/-adoc/AdocSinglePageWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class AdocSinglePageWriter
bool visit(FunctionInfo const&) override;
bool visit(TypedefInfo const&) override;
bool visit(EnumInfo const&) override;
bool visit(VarInfo const&) override;
bool visit(VariableInfo const&) override;

//bool visitOverloads(Info const& P, OverloadInfo const&);
};
Expand Down
2 changes: 1 addition & 1 deletion source/-adoc/AdocWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ write(
void
AdocWriter::
write(
VarInfo const& I)
VariableInfo const& I)
{
}

Expand Down
2 changes: 1 addition & 1 deletion source/-adoc/AdocWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class AdocWriter
void write(FunctionInfo const& I);
void write(TypedefInfo const& I);
void write(EnumInfo const& I);
void write(VarInfo const& I);
void write(VariableInfo const& I);

virtual llvm::StringRef linkFor(Info const&);
virtual llvm::StringRef linkFor(Info const&, OverloadInfo const&);
Expand Down
4 changes: 2 additions & 2 deletions source/AST/ASTVisitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ buildField(
void
ASTVisitor::
buildVar(
VarInfo& I,
VariableInfo& I,
VarDecl* D)
{
if(! extractInfo(I, D))
Expand Down Expand Up @@ -1230,7 +1230,7 @@ Traverse(
MRDOX_ASSERT(! D->getDeclContext()->isRecord() ||
A != AccessSpecifier::AS_none);

VarInfo I(std::move(Template));
VariableInfo I(std::move(Template));
I.Access = getAccessFromSpecifier(A);

buildVar(I, D);
Expand Down
2 changes: 1 addition & 1 deletion source/AST/ASTVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class ASTVisitor
FieldDecl* D);

void buildVar(
VarInfo& I,
VariableInfo& I,
VarDecl* D);

template<class DeclTy>
Expand Down
2 changes: 1 addition & 1 deletion source/AST/AnyBlock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ class EnumBlock
//------------------------------------------------

class VarBlock
: public TopLevelBlock<VarInfo>
: public TopLevelBlock<VariableInfo>
{

public:
Expand Down
6 changes: 3 additions & 3 deletions source/AST/BitcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ RecordsByBlock{
// TypedefInfo
{BI_TYPEDEF_BLOCK_ID,
{TYPEDEF_IS_USING}},
// VarInfo
// VariableInfo
{BI_VARIABLE_BLOCK_ID, {VARIABLE_BITS}}
};

Expand Down Expand Up @@ -395,7 +395,7 @@ dispatchInfoForWrite(Info const* I)
emitBlock(*static_cast<TypedefInfo const*>(I));
break;
case InfoKind::Variable:
emitBlock(*static_cast<VarInfo const*>(I));
emitBlock(*static_cast<VariableInfo const*>(I));
break;
case InfoKind::Field:
emitBlock(*static_cast<FieldInfo const*>(I));
Expand Down Expand Up @@ -1064,7 +1064,7 @@ emitBlock(
void
BitcodeWriter::
emitBlock(
VarInfo const& I)
VariableInfo const& I)
{
StreamSubBlockGuard Block(Stream, BI_VARIABLE_BLOCK_ID);
emitInfoPart(I);
Expand Down
2 changes: 1 addition & 1 deletion source/AST/BitcodeWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class BitcodeWriter
void emitBlock(TArg const& T);
void emitBlock(TypedefInfo const& I);
void emitBlock(TypeInfo const& I);
void emitBlock(VarInfo const& I);
void emitBlock(VariableInfo const& I);
void emitBlock(FieldInfo const& I);

//--------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions source/Metadata/Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <mrdox/Metadata/Function.hpp>
#include <mrdox/Metadata/Record.hpp>
#include <mrdox/Metadata/Typedef.hpp>
#include <mrdox/Metadata/Var.hpp>
#include <mrdox/Metadata/Variable.hpp>
#include <algorithm>

namespace clang {
Expand Down Expand Up @@ -125,7 +125,7 @@ class Interface::Build
break;
case InfoKind::Variable:
vars_.push_back({ actualAccess,
{ static_cast<const VarInfo*>(&I), &From } });
{ static_cast<const VariableInfo*>(&I), &From } });
break;

default:
Expand Down
2 changes: 1 addition & 1 deletion source/Metadata/Reduce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ void merge(FieldInfo& I, FieldInfo&& Other)
I.Default = std::move(Other.Default);
}

void merge(VarInfo& I, VarInfo&& Other)
void merge(VariableInfo& I, VariableInfo&& Other)
{
MRDOX_ASSERT(canMerge(I, Other));
if(I.Type.id == SymbolID::zero && I.Type.Name.empty())
Expand Down
2 changes: 1 addition & 1 deletion source/Metadata/Reduce.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void merge(FunctionInfo& I, FunctionInfo&& Other);
void merge(TypedefInfo& I, TypedefInfo&& Other);
void merge(EnumInfo& I, EnumInfo&& Other);
void merge(FieldInfo& I, FieldInfo&& Other);
void merge(VarInfo& I, VarInfo&& Other);
void merge(VariableInfo& I, VariableInfo&& Other);
void merge(SpecializationInfo& I, SpecializationInfo&& Other);

//
Expand Down
4 changes: 2 additions & 2 deletions source/Tool/Corpus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bool Corpus::Visitor::visit(EnumInfo const&)
return true;
}

bool Corpus::Visitor::visit(VarInfo const&)
bool Corpus::Visitor::visit(VariableInfo const&)
{
return true;
}
Expand Down Expand Up @@ -104,7 +104,7 @@ traverse(
case InfoKind::Enum:
return f.visit(static_cast<EnumInfo const&>(I));
case InfoKind::Variable:
return f.visit(static_cast<VarInfo const&>(I));
return f.visit(static_cast<VariableInfo const&>(I));
case InfoKind::Field:
return f.visit(static_cast<FieldInfo const&>(I));
case InfoKind::Specialization:
Expand Down
2 changes: 1 addition & 1 deletion source/Tool/CorpusImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ mergeInfos(std::vector<std::unique_ptr<Info>>& Values)
case InfoKind::Typedef:
return reduce<TypedefInfo>(Values);
case InfoKind::Variable:
return reduce<VarInfo>(Values);
return reduce<VariableInfo>(Values);
case InfoKind::Field:
return reduce<FieldInfo>(Values);
case InfoKind::Specialization:
Expand Down

0 comments on commit 711baf4

Please sign in to comment.