forked from OSchip/llvm-project
[clang] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
This commit is contained in:
parent
728c77dbb3
commit
cb7f806a3a
|
@ -131,8 +131,7 @@ public:
|
||||||
NamedConcept(NamedConcept), ArgsAsWritten(ArgsAsWritten) {}
|
NamedConcept(NamedConcept), ArgsAsWritten(ArgsAsWritten) {}
|
||||||
|
|
||||||
ConceptReference()
|
ConceptReference()
|
||||||
: TemplateKWLoc(), FoundDecl(nullptr), NamedConcept(nullptr),
|
: FoundDecl(nullptr), NamedConcept(nullptr), ArgsAsWritten(nullptr) {}
|
||||||
ArgsAsWritten(nullptr) {}
|
|
||||||
|
|
||||||
const NestedNameSpecifierLoc &getNestedNameSpecifierLoc() const {
|
const NestedNameSpecifierLoc &getNestedNameSpecifierLoc() const {
|
||||||
return NestedNameSpec;
|
return NestedNameSpec;
|
||||||
|
|
|
@ -40,7 +40,7 @@ struct SourceRange {
|
||||||
|
|
||||||
/// A VariantValue instance annotated with its parser context.
|
/// A VariantValue instance annotated with its parser context.
|
||||||
struct ParserValue {
|
struct ParserValue {
|
||||||
ParserValue() : Range() {}
|
ParserValue() {}
|
||||||
StringRef Text;
|
StringRef Text;
|
||||||
SourceRange Range;
|
SourceRange Range;
|
||||||
VariantValue Value;
|
VariantValue Value;
|
||||||
|
|
|
@ -1475,8 +1475,7 @@ private:
|
||||||
/// information that has been parsed prior to parsing declaration
|
/// information that has been parsed prior to parsing declaration
|
||||||
/// specifiers.
|
/// specifiers.
|
||||||
struct ParsedTemplateInfo {
|
struct ParsedTemplateInfo {
|
||||||
ParsedTemplateInfo()
|
ParsedTemplateInfo() : Kind(NonTemplate), TemplateParams(nullptr) {}
|
||||||
: Kind(NonTemplate), TemplateParams(nullptr), TemplateLoc() { }
|
|
||||||
|
|
||||||
ParsedTemplateInfo(TemplateParameterLists *TemplateParams,
|
ParsedTemplateInfo(TemplateParameterLists *TemplateParams,
|
||||||
bool isSpecialization,
|
bool isSpecialization,
|
||||||
|
|
|
@ -1080,7 +1080,7 @@ struct ParsedAttributesWithRange : ParsedAttributes {
|
||||||
SourceRange Range;
|
SourceRange Range;
|
||||||
};
|
};
|
||||||
struct ParsedAttributesViewWithRange : ParsedAttributesView {
|
struct ParsedAttributesViewWithRange : ParsedAttributesView {
|
||||||
ParsedAttributesViewWithRange() : ParsedAttributesView() {}
|
ParsedAttributesViewWithRange() {}
|
||||||
void clearListOnly() {
|
void clearListOnly() {
|
||||||
ParsedAttributesView::clearListOnly();
|
ParsedAttributesView::clearListOnly();
|
||||||
Range = SourceRange();
|
Range = SourceRange();
|
||||||
|
|
|
@ -63,8 +63,7 @@ namespace clang {
|
||||||
ParsedTemplateTy Template,
|
ParsedTemplateTy Template,
|
||||||
SourceLocation TemplateLoc)
|
SourceLocation TemplateLoc)
|
||||||
: Kind(ParsedTemplateArgument::Template),
|
: Kind(ParsedTemplateArgument::Template),
|
||||||
Arg(Template.getAsOpaquePtr()),
|
Arg(Template.getAsOpaquePtr()), SS(SS), Loc(TemplateLoc) {}
|
||||||
SS(SS), Loc(TemplateLoc), EllipsisLoc() { }
|
|
||||||
|
|
||||||
/// Determine whether the given template argument is invalid.
|
/// Determine whether the given template argument is invalid.
|
||||||
bool isInvalid() const { return Arg == nullptr; }
|
bool isInvalid() const { return Arg == nullptr; }
|
||||||
|
|
|
@ -36,8 +36,8 @@ class MicrosoftNumberingContext : public MangleNumberingContext {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MicrosoftNumberingContext()
|
MicrosoftNumberingContext()
|
||||||
: MangleNumberingContext(), LambdaManglingNumber(0),
|
: LambdaManglingNumber(0), StaticLocalNumber(0),
|
||||||
StaticLocalNumber(0), StaticThreadlocalNumber(0) {}
|
StaticThreadlocalNumber(0) {}
|
||||||
|
|
||||||
unsigned getManglingNumber(const CXXMethodDecl *CallOperator) override {
|
unsigned getManglingNumber(const CXXMethodDecl *CallOperator) override {
|
||||||
return ++LambdaManglingNumber;
|
return ++LambdaManglingNumber;
|
||||||
|
|
|
@ -195,7 +195,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
|
||||||
CodeSegStack(nullptr), FpPragmaStack(FPOptionsOverride()),
|
CodeSegStack(nullptr), FpPragmaStack(FPOptionsOverride()),
|
||||||
CurInitSeg(nullptr), VisContext(nullptr),
|
CurInitSeg(nullptr), VisContext(nullptr),
|
||||||
PragmaAttributeCurrentTargetDecl(nullptr),
|
PragmaAttributeCurrentTargetDecl(nullptr),
|
||||||
IsBuildingRecoveryCallExpr(false), Cleanup{}, LateTemplateParser(nullptr),
|
IsBuildingRecoveryCallExpr(false), LateTemplateParser(nullptr),
|
||||||
LateTemplateParserCleanup(nullptr), OpaqueParser(nullptr), IdResolver(pp),
|
LateTemplateParserCleanup(nullptr), OpaqueParser(nullptr), IdResolver(pp),
|
||||||
StdExperimentalNamespaceCache(nullptr), StdInitializerList(nullptr),
|
StdExperimentalNamespaceCache(nullptr), StdInitializerList(nullptr),
|
||||||
StdCoroutineTraitsCache(nullptr), CXXTypeInfoDecl(nullptr),
|
StdCoroutineTraitsCache(nullptr), CXXTypeInfoDecl(nullptr),
|
||||||
|
|
|
@ -6614,7 +6614,7 @@ QualType Sema::FindCompositePointerType(SourceLocation Loc,
|
||||||
const Type *ClassOrBound;
|
const Type *ClassOrBound;
|
||||||
|
|
||||||
Step(Kind K, const Type *ClassOrBound = nullptr)
|
Step(Kind K, const Type *ClassOrBound = nullptr)
|
||||||
: K(K), Quals(), ClassOrBound(ClassOrBound) {}
|
: K(K), ClassOrBound(ClassOrBound) {}
|
||||||
QualType rebuild(ASTContext &Ctx, QualType T) const {
|
QualType rebuild(ASTContext &Ctx, QualType T) const {
|
||||||
T = Ctx.getQualifiedType(T, Quals);
|
T = Ctx.getQualifiedType(T, Quals);
|
||||||
switch (K) {
|
switch (K) {
|
||||||
|
|
|
@ -1489,8 +1489,7 @@ protected:
|
||||||
class raw_self_contained_string_ostream : private string_holder,
|
class raw_self_contained_string_ostream : private string_holder,
|
||||||
public raw_string_ostream {
|
public raw_string_ostream {
|
||||||
public:
|
public:
|
||||||
raw_self_contained_string_ostream()
|
raw_self_contained_string_ostream() : raw_string_ostream(S) {}
|
||||||
: string_holder(), raw_string_ostream(S) {}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const char LLVMLicenseHeader[] =
|
const char LLVMLicenseHeader[] =
|
||||||
|
|
Loading…
Reference in New Issue