[clang] Remove redundant member initialization (NFC)
Identified with readability-redundant-member-init.
This commit is contained in:
parent
5e1177302b
commit
d677a7cb05
|
@ -133,7 +133,7 @@ class CommonTypeInfo : public CommonEntityInfo {
|
|||
llvm::Optional<std::string> NSErrorDomain;
|
||||
|
||||
public:
|
||||
CommonTypeInfo() : CommonEntityInfo() {}
|
||||
CommonTypeInfo() {}
|
||||
|
||||
const llvm::Optional<std::string> &getSwiftBridge() const {
|
||||
return SwiftBridge;
|
||||
|
@ -208,10 +208,9 @@ class ObjCContextInfo : public CommonTypeInfo {
|
|||
|
||||
public:
|
||||
ObjCContextInfo()
|
||||
: CommonTypeInfo(), HasDefaultNullability(0), DefaultNullability(0),
|
||||
HasDesignatedInits(0), SwiftImportAsNonGenericSpecified(false),
|
||||
SwiftImportAsNonGeneric(false), SwiftObjCMembersSpecified(false),
|
||||
SwiftObjCMembers(false) {}
|
||||
: HasDefaultNullability(0), DefaultNullability(0), HasDesignatedInits(0),
|
||||
SwiftImportAsNonGenericSpecified(false), SwiftImportAsNonGeneric(false),
|
||||
SwiftObjCMembersSpecified(false), SwiftObjCMembers(false) {}
|
||||
|
||||
/// Determine the default nullability for properties and methods of this
|
||||
/// class.
|
||||
|
@ -309,7 +308,7 @@ class VariableInfo : public CommonEntityInfo {
|
|||
std::string Type;
|
||||
|
||||
public:
|
||||
VariableInfo() : CommonEntityInfo(), NullabilityAudited(false), Nullable(0) {}
|
||||
VariableInfo() : NullabilityAudited(false), Nullable(0) {}
|
||||
|
||||
llvm::Optional<NullabilityKind> getNullability() const {
|
||||
return NullabilityAudited ? llvm::Optional<NullabilityKind>(
|
||||
|
@ -358,8 +357,7 @@ class ObjCPropertyInfo : public VariableInfo {
|
|||
|
||||
public:
|
||||
ObjCPropertyInfo()
|
||||
: VariableInfo(), SwiftImportAsAccessorsSpecified(false),
|
||||
SwiftImportAsAccessors(false) {}
|
||||
: SwiftImportAsAccessorsSpecified(false), SwiftImportAsAccessors(false) {}
|
||||
|
||||
llvm::Optional<bool> getSwiftImportAsAccessors() const {
|
||||
return SwiftImportAsAccessorsSpecified
|
||||
|
@ -423,8 +421,7 @@ class ParamInfo : public VariableInfo {
|
|||
|
||||
public:
|
||||
ParamInfo()
|
||||
: VariableInfo(), NoEscapeSpecified(false), NoEscape(false),
|
||||
RawRetainCountConvention() {}
|
||||
: NoEscapeSpecified(false), NoEscape(false), RawRetainCountConvention() {}
|
||||
|
||||
llvm::Optional<bool> isNoEscape() const {
|
||||
if (!NoEscapeSpecified)
|
||||
|
@ -514,7 +511,7 @@ public:
|
|||
std::vector<ParamInfo> Params;
|
||||
|
||||
FunctionInfo()
|
||||
: CommonEntityInfo(), NullabilityAudited(false), NumAdjustedNullable(0),
|
||||
: NullabilityAudited(false), NumAdjustedNullable(0),
|
||||
RawRetainCountConvention() {}
|
||||
|
||||
static unsigned getMaxNullabilityIndex() {
|
||||
|
@ -607,8 +604,7 @@ public:
|
|||
/// Whether this is a required initializer.
|
||||
unsigned RequiredInit : 1;
|
||||
|
||||
ObjCMethodInfo()
|
||||
: FunctionInfo(), DesignatedInit(false), RequiredInit(false) {}
|
||||
ObjCMethodInfo() : DesignatedInit(false), RequiredInit(false) {}
|
||||
|
||||
friend bool operator==(const ObjCMethodInfo &, const ObjCMethodInfo &);
|
||||
|
||||
|
@ -639,19 +635,19 @@ inline bool operator!=(const ObjCMethodInfo &LHS, const ObjCMethodInfo &RHS) {
|
|||
/// Describes API notes data for a global variable.
|
||||
class GlobalVariableInfo : public VariableInfo {
|
||||
public:
|
||||
GlobalVariableInfo() : VariableInfo() {}
|
||||
GlobalVariableInfo() {}
|
||||
};
|
||||
|
||||
/// Describes API notes data for a global function.
|
||||
class GlobalFunctionInfo : public FunctionInfo {
|
||||
public:
|
||||
GlobalFunctionInfo() : FunctionInfo() {}
|
||||
GlobalFunctionInfo() {}
|
||||
};
|
||||
|
||||
/// Describes API notes data for an enumerator.
|
||||
class EnumConstantInfo : public CommonEntityInfo {
|
||||
public:
|
||||
EnumConstantInfo() : CommonEntityInfo() {}
|
||||
EnumConstantInfo() {}
|
||||
};
|
||||
|
||||
/// Describes API notes data for a tag.
|
||||
|
@ -662,7 +658,7 @@ class TagInfo : public CommonTypeInfo {
|
|||
public:
|
||||
llvm::Optional<EnumExtensibilityKind> EnumExtensibility;
|
||||
|
||||
TagInfo() : CommonTypeInfo(), HasFlagEnum(0), IsFlagEnum(0) {}
|
||||
TagInfo() : HasFlagEnum(0), IsFlagEnum(0) {}
|
||||
|
||||
llvm::Optional<bool> isFlagEnum() const {
|
||||
if (HasFlagEnum)
|
||||
|
@ -706,7 +702,7 @@ class TypedefInfo : public CommonTypeInfo {
|
|||
public:
|
||||
llvm::Optional<SwiftNewTypeKind> SwiftWrapper;
|
||||
|
||||
TypedefInfo() : CommonTypeInfo() {}
|
||||
TypedefInfo() {}
|
||||
|
||||
TypedefInfo &operator|=(const TypedefInfo &RHS) {
|
||||
static_cast<CommonTypeInfo &>(*this) |= RHS;
|
||||
|
|
|
@ -123,17 +123,17 @@ protected:
|
|||
const ASTTemplateArgumentListInfo *ArgsAsWritten;
|
||||
|
||||
public:
|
||||
|
||||
ConceptReference(NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc,
|
||||
DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl,
|
||||
ConceptDecl *NamedConcept,
|
||||
const ASTTemplateArgumentListInfo *ArgsAsWritten) :
|
||||
NestedNameSpec(NNS), TemplateKWLoc(TemplateKWLoc),
|
||||
ConceptName(ConceptNameInfo), FoundDecl(FoundDecl),
|
||||
NamedConcept(NamedConcept), ArgsAsWritten(ArgsAsWritten) {}
|
||||
const ASTTemplateArgumentListInfo *ArgsAsWritten)
|
||||
: NestedNameSpec(NNS), TemplateKWLoc(TemplateKWLoc),
|
||||
ConceptName(ConceptNameInfo), FoundDecl(FoundDecl),
|
||||
NamedConcept(NamedConcept), ArgsAsWritten(ArgsAsWritten) {}
|
||||
|
||||
ConceptReference() : NestedNameSpec(), TemplateKWLoc(), ConceptName(),
|
||||
FoundDecl(nullptr), NamedConcept(nullptr), ArgsAsWritten(nullptr) {}
|
||||
ConceptReference()
|
||||
: TemplateKWLoc(), FoundDecl(nullptr), NamedConcept(nullptr),
|
||||
ArgsAsWritten(nullptr) {}
|
||||
|
||||
const NestedNameSpecifierLoc &getNestedNameSpecifierLoc() const {
|
||||
return NestedNameSpec;
|
||||
|
|
|
@ -424,19 +424,13 @@ public:
|
|||
|
||||
Attribute() { }
|
||||
|
||||
Attribute(SourceLocation NameLocBegin, StringRef Name) :
|
||||
NameLocBegin(NameLocBegin), Name(Name),
|
||||
EqualsLoc(SourceLocation()),
|
||||
ValueRange(SourceRange()), Value(StringRef())
|
||||
{ }
|
||||
Attribute(SourceLocation NameLocBegin, StringRef Name)
|
||||
: NameLocBegin(NameLocBegin), Name(Name), EqualsLoc(SourceLocation()) {}
|
||||
|
||||
Attribute(SourceLocation NameLocBegin, StringRef Name,
|
||||
SourceLocation EqualsLoc,
|
||||
SourceRange ValueRange, StringRef Value) :
|
||||
NameLocBegin(NameLocBegin), Name(Name),
|
||||
EqualsLoc(EqualsLoc),
|
||||
ValueRange(ValueRange), Value(Value)
|
||||
{ }
|
||||
SourceLocation EqualsLoc, SourceRange ValueRange, StringRef Value)
|
||||
: NameLocBegin(NameLocBegin), Name(Name), EqualsLoc(EqualsLoc),
|
||||
ValueRange(ValueRange), Value(Value) {}
|
||||
|
||||
SourceLocation getNameLocEnd() const {
|
||||
return NameLocBegin.getLocWithOffset(Name.size());
|
||||
|
|
|
@ -779,17 +779,13 @@ private:
|
|||
LParenLoc(LParenLocation), DeclType(T), DeclTypeSourceInfo(TSI),
|
||||
PropertyAttributes(ObjCPropertyAttribute::kind_noattr),
|
||||
PropertyAttributesAsWritten(ObjCPropertyAttribute::kind_noattr),
|
||||
PropertyImplementation(propControl), GetterName(Selector()),
|
||||
SetterName(Selector()) {}
|
||||
PropertyImplementation(propControl) {}
|
||||
|
||||
public:
|
||||
static ObjCPropertyDecl *Create(ASTContext &C, DeclContext *DC,
|
||||
SourceLocation L,
|
||||
IdentifierInfo *Id, SourceLocation AtLocation,
|
||||
SourceLocation LParenLocation,
|
||||
QualType T,
|
||||
TypeSourceInfo *TSI,
|
||||
PropertyControl propControl = None);
|
||||
static ObjCPropertyDecl *
|
||||
Create(ASTContext &C, DeclContext *DC, SourceLocation L, IdentifierInfo *Id,
|
||||
SourceLocation AtLocation, SourceLocation LParenLocation, QualType T,
|
||||
TypeSourceInfo *TSI, PropertyControl propControl = None);
|
||||
|
||||
static ObjCPropertyDecl *CreateDeserialized(ASTContext &C, unsigned ID);
|
||||
|
||||
|
|
|
@ -2388,7 +2388,7 @@ public:
|
|||
|
||||
/// Create an offsetof node that refers into a C++ base class.
|
||||
explicit OffsetOfNode(const CXXBaseSpecifier *Base)
|
||||
: Range(), Data(reinterpret_cast<uintptr_t>(Base) | OffsetOfNode::Base) {}
|
||||
: Data(reinterpret_cast<uintptr_t>(Base) | OffsetOfNode::Base) {}
|
||||
|
||||
/// Determine what kind of offsetof node this is.
|
||||
Kind getKind() const { return static_cast<Kind>(Data & Mask); }
|
||||
|
|
|
@ -40,7 +40,7 @@ struct SourceRange {
|
|||
|
||||
/// A VariantValue instance annotated with its parser context.
|
||||
struct ParserValue {
|
||||
ParserValue() : Text(), Range(), Value() {}
|
||||
ParserValue() : Range() {}
|
||||
StringRef Text;
|
||||
SourceRange Range;
|
||||
VariantValue Value;
|
||||
|
|
|
@ -153,8 +153,7 @@ namespace consumed {
|
|||
public:
|
||||
ConsumedStateMap() = default;
|
||||
ConsumedStateMap(const ConsumedStateMap &Other)
|
||||
: Reachable(Other.Reachable), From(Other.From), VarMap(Other.VarMap),
|
||||
TmpMap() {}
|
||||
: Reachable(Other.Reachable), From(Other.From), VarMap(Other.VarMap) {}
|
||||
|
||||
/// Warn if any of the parameters being tracked are not in the state
|
||||
/// they were declared to be in upon return from a function.
|
||||
|
|
|
@ -1326,7 +1326,7 @@ protected:
|
|||
public:
|
||||
/// Copy constructor. When copied, this "takes" the diagnostic info from the
|
||||
/// input and neuters it.
|
||||
DiagnosticBuilder(const DiagnosticBuilder &D) : StreamingDiagnostic() {
|
||||
DiagnosticBuilder(const DiagnosticBuilder &D) {
|
||||
DiagObj = D.DiagObj;
|
||||
DiagStorage = D.DiagStorage;
|
||||
IsActive = D.IsActive;
|
||||
|
|
|
@ -49,8 +49,7 @@ public:
|
|||
PartialDiagnostic(unsigned DiagID, DiagStorageAllocator &Allocator_)
|
||||
: StreamingDiagnostic(Allocator_), DiagID(DiagID) {}
|
||||
|
||||
PartialDiagnostic(const PartialDiagnostic &Other)
|
||||
: StreamingDiagnostic(), DiagID(Other.DiagID) {
|
||||
PartialDiagnostic(const PartialDiagnostic &Other) : DiagID(Other.DiagID) {
|
||||
Allocator = Other.Allocator;
|
||||
if (Other.DiagStorage) {
|
||||
DiagStorage = getStorage();
|
||||
|
|
|
@ -434,8 +434,7 @@ public:
|
|||
FS_noreturn_specified(false), Friend_specified(false),
|
||||
ConstexprSpecifier(
|
||||
static_cast<unsigned>(ConstexprSpecKind::Unspecified)),
|
||||
FS_explicit_specifier(), Attrs(attrFactory), writtenBS(),
|
||||
ObjCQualifiers(nullptr) {}
|
||||
Attrs(attrFactory), writtenBS(), ObjCQualifiers(nullptr) {}
|
||||
|
||||
// storage-class-specifier
|
||||
SCS getStorageClassSpec() const { return (SCS)StorageClassSpec; }
|
||||
|
|
|
@ -577,8 +577,7 @@ class Sema;
|
|||
|
||||
ImplicitConversionSequence()
|
||||
: ConversionKind(Uninitialized),
|
||||
InitializerListOfIncompleteArray(false),
|
||||
InitializerListContainerType() {
|
||||
InitializerListOfIncompleteArray(false) {
|
||||
Standard.setAsIdentityConversion();
|
||||
}
|
||||
|
||||
|
|
|
@ -1365,10 +1365,10 @@ public:
|
|||
};
|
||||
|
||||
private:
|
||||
llvm::PointerIntPair<CXXMethodDecl*, 2> Pair;
|
||||
llvm::PointerIntPair<CXXMethodDecl *, 2> Pair;
|
||||
|
||||
public:
|
||||
SpecialMemberOverloadResult() : Pair() {}
|
||||
SpecialMemberOverloadResult() {}
|
||||
SpecialMemberOverloadResult(CXXMethodDecl *MD)
|
||||
: Pair(MD, MD->isDeleted() ? NoMemberOrDeleted : Success) {}
|
||||
|
||||
|
@ -7520,7 +7520,7 @@ public:
|
|||
RequiredTemplateKind(SourceLocation TemplateKWLoc = SourceLocation())
|
||||
: TemplateKW(TemplateKWLoc) {}
|
||||
/// Template name is unconditionally required.
|
||||
RequiredTemplateKind(TemplateNameIsRequiredTag) : TemplateKW() {}
|
||||
RequiredTemplateKind(TemplateNameIsRequiredTag) {}
|
||||
|
||||
SourceLocation getTemplateKeywordLoc() const {
|
||||
return TemplateKW.getValueOr(SourceLocation());
|
||||
|
@ -13061,7 +13061,7 @@ private:
|
|||
ValueDecl *MD;
|
||||
CharUnits Alignment;
|
||||
|
||||
MisalignedMember() : E(), RD(), MD(), Alignment() {}
|
||||
MisalignedMember() : E(), RD(), MD() {}
|
||||
MisalignedMember(Expr *E, RecordDecl *RD, ValueDecl *MD,
|
||||
CharUnits Alignment)
|
||||
: E(E), RD(RD), MD(MD), Alignment(Alignment) {}
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace ento {
|
|||
/// of a region in a given state along the analysis path.
|
||||
class DynamicTypeInfo {
|
||||
public:
|
||||
DynamicTypeInfo() : DynTy(QualType()) {}
|
||||
DynamicTypeInfo() {}
|
||||
|
||||
DynamicTypeInfo(QualType Ty, bool CanBeSub = true)
|
||||
: DynTy(Ty), CanBeASubClass(CanBeSub) {}
|
||||
|
|
|
@ -154,13 +154,11 @@ public:
|
|||
std::vector<SourceLocation> &ARCMTMacroLocs;
|
||||
Optional<bool> EnableCFBridgeFns;
|
||||
|
||||
MigrationPass(ASTContext &Ctx, LangOptions::GCMode OrigGCMode,
|
||||
Sema &sema, TransformActions &TA,
|
||||
const CapturedDiagList &capturedDiags,
|
||||
MigrationPass(ASTContext &Ctx, LangOptions::GCMode OrigGCMode, Sema &sema,
|
||||
TransformActions &TA, const CapturedDiagList &capturedDiags,
|
||||
std::vector<SourceLocation> &ARCMTMacroLocs)
|
||||
: Ctx(Ctx), OrigGCMode(OrigGCMode), MigOptions(),
|
||||
SemaRef(sema), TA(TA), CapturedDiags(capturedDiags),
|
||||
ARCMTMacroLocs(ARCMTMacroLocs) { }
|
||||
: Ctx(Ctx), OrigGCMode(OrigGCMode), SemaRef(sema), TA(TA),
|
||||
CapturedDiags(capturedDiags), ARCMTMacroLocs(ARCMTMacroLocs) {}
|
||||
|
||||
const CapturedDiagList &getDiags() const { return CapturedDiags; }
|
||||
|
||||
|
|
|
@ -229,8 +229,9 @@ private:
|
|||
bool IsFollowedBySimpleReturnStmt;
|
||||
SmallVector<ObjCMessageExpr *, 4> Releases;
|
||||
|
||||
PoolScope() : PoolVar(nullptr), CompoundParent(nullptr), Begin(), End(),
|
||||
IsFollowedBySimpleReturnStmt(false) { }
|
||||
PoolScope()
|
||||
: PoolVar(nullptr), CompoundParent(nullptr),
|
||||
IsFollowedBySimpleReturnStmt(false) {}
|
||||
|
||||
SourceRange getIndentedRange() const {
|
||||
Stmt::child_iterator rangeS = Begin;
|
||||
|
|
|
@ -3272,7 +3272,7 @@ void MSGuidDecl::anchor() {}
|
|||
|
||||
MSGuidDecl::MSGuidDecl(DeclContext *DC, QualType T, Parts P)
|
||||
: ValueDecl(Decl::MSGuid, DC, SourceLocation(), DeclarationName(), T),
|
||||
PartVal(P), APVal() {}
|
||||
PartVal(P) {}
|
||||
|
||||
MSGuidDecl *MSGuidDecl::Create(const ASTContext &C, QualType T, Parts P) {
|
||||
DeclContext *DC = C.getTranslationUnitDecl();
|
||||
|
|
|
@ -57,9 +57,9 @@ ConceptSpecializationExpr::ConceptSpecializationExpr(
|
|||
}
|
||||
|
||||
ConceptSpecializationExpr::ConceptSpecializationExpr(EmptyShell Empty,
|
||||
unsigned NumTemplateArgs)
|
||||
: Expr(ConceptSpecializationExprClass, Empty), ConceptReference(),
|
||||
NumTemplateArgs(NumTemplateArgs) { }
|
||||
unsigned NumTemplateArgs)
|
||||
: Expr(ConceptSpecializationExprClass, Empty),
|
||||
NumTemplateArgs(NumTemplateArgs) {}
|
||||
|
||||
void ConceptSpecializationExpr::setTemplateArguments(
|
||||
ArrayRef<TemplateArgument> Converted) {
|
||||
|
|
|
@ -1706,8 +1706,8 @@ namespace {
|
|||
|
||||
struct MemberPtr {
|
||||
MemberPtr() {}
|
||||
explicit MemberPtr(const ValueDecl *Decl) :
|
||||
DeclAndIsDerivedMember(Decl, false), Path() {}
|
||||
explicit MemberPtr(const ValueDecl *Decl)
|
||||
: DeclAndIsDerivedMember(Decl, false) {}
|
||||
|
||||
/// The member or (direct or indirect) field referred to by this member
|
||||
/// pointer, or 0 if this is a null member pointer.
|
||||
|
|
|
@ -531,9 +531,7 @@ class CFGBuilder {
|
|||
public:
|
||||
explicit CFGBuilder(ASTContext *astContext,
|
||||
const CFG::BuildOptions &buildOpts)
|
||||
: Context(astContext), cfg(new CFG()), // crew a new CFG
|
||||
ConstructionContextMap(), BuildOpts(buildOpts) {}
|
||||
|
||||
: Context(astContext), cfg(new CFG()), BuildOpts(buildOpts) {}
|
||||
|
||||
// buildCFG - Used by external clients to construct the CFG.
|
||||
std::unique_ptr<CFG> buildCFG(const Decl *D, Stmt *Statement);
|
||||
|
|
|
@ -25,7 +25,7 @@ using namespace clang;
|
|||
static const LangASMap DefaultAddrSpaceMap = {0};
|
||||
|
||||
// TargetInfo Constructor.
|
||||
TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) {
|
||||
TargetInfo::TargetInfo(const llvm::Triple &T) : Triple(T) {
|
||||
// Set defaults. Defaults are set for a 32-bit RISC platform, like PPC or
|
||||
// SPARC. These should be overridden by concrete targets as needed.
|
||||
BigEndian = !T.isLittleEndian();
|
||||
|
|
|
@ -197,8 +197,7 @@ public:
|
|||
PassManagerBuilderWrapper(const Triple &TargetTriple,
|
||||
const CodeGenOptions &CGOpts,
|
||||
const LangOptions &LangOpts)
|
||||
: PassManagerBuilder(), TargetTriple(TargetTriple), CGOpts(CGOpts),
|
||||
LangOpts(LangOpts) {}
|
||||
: TargetTriple(TargetTriple), CGOpts(CGOpts), LangOpts(LangOpts) {}
|
||||
const Triple &getTargetTriple() const { return TargetTriple; }
|
||||
const CodeGenOptions &getCGOpts() const { return CGOpts; }
|
||||
const LangOptions &getLangOpts() const { return LangOpts; }
|
||||
|
|
|
@ -49,11 +49,11 @@ class CGCalleeInfo {
|
|||
GlobalDecl CalleeDecl;
|
||||
|
||||
public:
|
||||
explicit CGCalleeInfo() : CalleeProtoTy(nullptr), CalleeDecl() {}
|
||||
explicit CGCalleeInfo() : CalleeProtoTy(nullptr) {}
|
||||
CGCalleeInfo(const FunctionProtoType *calleeProtoTy, GlobalDecl calleeDecl)
|
||||
: CalleeProtoTy(calleeProtoTy), CalleeDecl(calleeDecl) {}
|
||||
CGCalleeInfo(const FunctionProtoType *calleeProtoTy)
|
||||
: CalleeProtoTy(calleeProtoTy), CalleeDecl() {}
|
||||
: CalleeProtoTy(calleeProtoTy) {}
|
||||
CGCalleeInfo(GlobalDecl calleeDecl)
|
||||
: CalleeProtoTy(nullptr), CalleeDecl(calleeDecl) {}
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ struct CGBitFieldInfo {
|
|||
CharUnits VolatileStorageOffset;
|
||||
|
||||
CGBitFieldInfo()
|
||||
: Offset(), Size(), IsSigned(), StorageSize(), StorageOffset(),
|
||||
VolatileOffset(), VolatileStorageSize(), VolatileStorageOffset() {}
|
||||
: Offset(), Size(), IsSigned(), StorageSize(), VolatileOffset(),
|
||||
VolatileStorageSize() {}
|
||||
|
||||
CGBitFieldInfo(unsigned Offset, unsigned Size, bool IsSigned,
|
||||
unsigned StorageSize, CharUnits StorageOffset)
|
||||
|
|
|
@ -6789,7 +6789,7 @@ void CodeGenFunction::EmitOMPTargetDataDirective(
|
|||
|
||||
public:
|
||||
explicit DevicePointerPrivActionTy(bool &PrivatizeDevicePointers)
|
||||
: PrePostActionTy(), PrivatizeDevicePointers(PrivatizeDevicePointers) {}
|
||||
: PrivatizeDevicePointers(PrivatizeDevicePointers) {}
|
||||
void Enter(CodeGenFunction &CGF) override {
|
||||
PrivatizeDevicePointers = true;
|
||||
}
|
||||
|
|
|
@ -242,11 +242,10 @@ public:
|
|||
/// A jump destination is an abstract label, branching to which may
|
||||
/// require a jump out through normal cleanups.
|
||||
struct JumpDest {
|
||||
JumpDest() : Block(nullptr), ScopeDepth(), Index(0) {}
|
||||
JumpDest(llvm::BasicBlock *Block,
|
||||
EHScopeStack::stable_iterator Depth,
|
||||
JumpDest() : Block(nullptr), Index(0) {}
|
||||
JumpDest(llvm::BasicBlock *Block, EHScopeStack::stable_iterator Depth,
|
||||
unsigned Index)
|
||||
: Block(Block), ScopeDepth(Depth), Index(Index) {}
|
||||
: Block(Block), ScopeDepth(Depth), Index(Index) {}
|
||||
|
||||
bool isValid() const { return Block != nullptr; }
|
||||
llvm::BasicBlock *getBlock() const { return Block; }
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
static_assert(LastHashType <= TooBig, "Too many types in HashType");
|
||||
|
||||
PGOHash(PGOHashVersion HashVersion)
|
||||
: Working(0), Count(0), HashVersion(HashVersion), MD5() {}
|
||||
: Working(0), Count(0), HashVersion(HashVersion) {}
|
||||
void combine(HashType Type);
|
||||
uint64_t finalize();
|
||||
PGOHashVersion getHashVersion() const { return HashVersion; }
|
||||
|
|
|
@ -170,10 +170,8 @@ Driver::Driver(StringRef ClangExecutable, StringRef TargetTriple,
|
|||
: Diags(Diags), VFS(std::move(VFS)), Mode(GCCMode),
|
||||
SaveTemps(SaveTempsNone), BitcodeEmbed(EmbedNone), LTOMode(LTOK_None),
|
||||
ClangExecutable(ClangExecutable), SysRoot(DEFAULT_SYSROOT),
|
||||
DriverTitle(Title), CCPrintStatReportFilename(), CCPrintOptionsFilename(),
|
||||
CCPrintHeadersFilename(), CCLogDiagnosticsFilename(),
|
||||
CCCPrintBindings(false), CCPrintOptions(false), CCPrintHeaders(false),
|
||||
CCLogDiagnostics(false), CCGenDiagnostics(false),
|
||||
DriverTitle(Title), CCCPrintBindings(false), CCPrintOptions(false),
|
||||
CCPrintHeaders(false), CCLogDiagnostics(false), CCGenDiagnostics(false),
|
||||
CCPrintProcessStats(false), TargetTriple(TargetTriple), Saver(Alloc),
|
||||
CheckInputsExist(true), GenReproducer(false),
|
||||
SuppressMissingInputWarning(false) {
|
||||
|
|
|
@ -236,10 +236,10 @@ void MultiplexASTMutationListener::AddedAttributeToRecord(
|
|||
|
||||
MultiplexConsumer::MultiplexConsumer(
|
||||
std::vector<std::unique_ptr<ASTConsumer>> C)
|
||||
: Consumers(std::move(C)), MutationListener(), DeserializationListener() {
|
||||
: Consumers(std::move(C)) {
|
||||
// Collect the mutation listeners and deserialization listeners of all
|
||||
// children, and create a multiplex listener each if so.
|
||||
std::vector<ASTMutationListener*> mutationListeners;
|
||||
std::vector<ASTMutationListener *> mutationListeners;
|
||||
std::vector<ASTDeserializationListener*> serializationListeners;
|
||||
for (auto &Consumer : Consumers) {
|
||||
if (auto *mutationListener = Consumer->GetASTMutationListener())
|
||||
|
|
|
@ -95,8 +95,7 @@ class SDiagsMerger : SerializedDiagnosticReader {
|
|||
AbbrevLookup DiagFlagLookup;
|
||||
|
||||
public:
|
||||
SDiagsMerger(SDiagsWriter &Writer)
|
||||
: SerializedDiagnosticReader(), Writer(Writer) {}
|
||||
SDiagsMerger(SDiagsWriter &Writer) : Writer(Writer) {}
|
||||
|
||||
std::error_code mergeRecordsFromFile(const char *File) {
|
||||
return readDiagnostics(File);
|
||||
|
|
|
@ -128,7 +128,7 @@ class LogicalErrorHandler : public CFGCallback {
|
|||
Sema &S;
|
||||
|
||||
public:
|
||||
LogicalErrorHandler(Sema &S) : CFGCallback(), S(S) {}
|
||||
LogicalErrorHandler(Sema &S) : S(S) {}
|
||||
|
||||
static bool HasMacroID(const Expr *E) {
|
||||
if (E->getExprLoc().isMacroID())
|
||||
|
|
|
@ -14021,7 +14021,7 @@ class SequenceChecker : public ConstEvaluatedExprVisitor<SequenceChecker> {
|
|||
const Expr *UsageExpr;
|
||||
SequenceTree::Seq Seq;
|
||||
|
||||
Usage() : UsageExpr(nullptr), Seq() {}
|
||||
Usage() : UsageExpr(nullptr) {}
|
||||
};
|
||||
|
||||
struct UsageInfo {
|
||||
|
@ -14030,7 +14030,7 @@ class SequenceChecker : public ConstEvaluatedExprVisitor<SequenceChecker> {
|
|||
/// Have we issued a diagnostic for this object already?
|
||||
bool Diagnosed;
|
||||
|
||||
UsageInfo() : Uses(), Diagnosed(false) {}
|
||||
UsageInfo() : Diagnosed(false) {}
|
||||
};
|
||||
using UsageInfoMap = llvm::SmallDenseMap<Object, UsageInfo, 16>;
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ private:
|
|||
unsigned SingleDeclIndex;
|
||||
|
||||
public:
|
||||
ShadowMapEntry() : DeclOrVector(), SingleDeclIndex(0) {}
|
||||
ShadowMapEntry() : SingleDeclIndex(0) {}
|
||||
ShadowMapEntry(const ShadowMapEntry &) = delete;
|
||||
ShadowMapEntry(ShadowMapEntry &&Move) { *this = std::move(Move); }
|
||||
ShadowMapEntry &operator=(const ShadowMapEntry &) = delete;
|
||||
|
|
|
@ -4452,7 +4452,7 @@ namespace {
|
|||
|
||||
public:
|
||||
SubstituteDeducedTypeTransform(Sema &SemaRef, DependentAuto DA)
|
||||
: TreeTransform<SubstituteDeducedTypeTransform>(SemaRef), Replacement(),
|
||||
: TreeTransform<SubstituteDeducedTypeTransform>(SemaRef),
|
||||
ReplacementIsPack(DA.IsPack), UseTypeSugar(true) {}
|
||||
|
||||
SubstituteDeducedTypeTransform(Sema &SemaRef, QualType Replacement,
|
||||
|
|
|
@ -54,11 +54,7 @@ ProgramState::ProgramState(ProgramStateManager *mgr, const Environment& env,
|
|||
}
|
||||
|
||||
ProgramState::ProgramState(const ProgramState &RHS)
|
||||
: llvm::FoldingSetNode(),
|
||||
stateMgr(RHS.stateMgr),
|
||||
Env(RHS.Env),
|
||||
store(RHS.store),
|
||||
GDM(RHS.GDM),
|
||||
: stateMgr(RHS.stateMgr), Env(RHS.Env), store(RHS.store), GDM(RHS.GDM),
|
||||
refCount(0) {
|
||||
stateMgr->getStoreManager().incrementReferenceCount(store);
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ class BinaryFileHandler final : public FileHandler {
|
|||
std::string CurWriteBundleTarget;
|
||||
|
||||
public:
|
||||
BinaryFileHandler() : FileHandler() {}
|
||||
BinaryFileHandler() {}
|
||||
|
||||
~BinaryFileHandler() final {}
|
||||
|
||||
|
@ -576,8 +576,7 @@ class ObjectFileHandler final : public FileHandler {
|
|||
|
||||
public:
|
||||
ObjectFileHandler(std::unique_ptr<ObjectFile> ObjIn)
|
||||
: FileHandler(), Obj(std::move(ObjIn)),
|
||||
CurrentSection(Obj->section_begin()),
|
||||
: Obj(std::move(ObjIn)), CurrentSection(Obj->section_begin()),
|
||||
NextSection(Obj->section_begin()) {}
|
||||
|
||||
~ObjectFileHandler() final {}
|
||||
|
@ -813,8 +812,7 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
TextFileHandler(StringRef Comment)
|
||||
: FileHandler(), Comment(Comment), ReadChars(0) {
|
||||
TextFileHandler(StringRef Comment) : Comment(Comment), ReadChars(0) {
|
||||
BundleStartString =
|
||||
"\n" + Comment.str() + " " OFFLOAD_BUNDLER_MAGIC_STR "__START__ ";
|
||||
BundleEndString =
|
||||
|
|
|
@ -332,10 +332,9 @@ class CXIndexDataConsumer : public index::IndexDataConsumer {
|
|||
|
||||
public:
|
||||
CXIndexDataConsumer(CXClientData clientData, IndexerCallbacks &indexCallbacks,
|
||||
unsigned indexOptions, CXTranslationUnit cxTU)
|
||||
: Ctx(nullptr), ClientData(clientData), CB(indexCallbacks),
|
||||
IndexOptions(indexOptions), CXTU(cxTU),
|
||||
StrScratch(), StrAdapterCount(0) { }
|
||||
unsigned indexOptions, CXTranslationUnit cxTU)
|
||||
: Ctx(nullptr), ClientData(clientData), CB(indexCallbacks),
|
||||
IndexOptions(indexOptions), CXTU(cxTU), StrAdapterCount(0) {}
|
||||
|
||||
ASTContext &getASTContext() const { return *Ctx; }
|
||||
CXTranslationUnit getCXTU() const { return CXTU; }
|
||||
|
|
|
@ -235,7 +235,7 @@ protected:
|
|||
|
||||
public:
|
||||
DiagLoader(enum CXLoadDiag_Error *e, CXString *es)
|
||||
: SerializedDiagnosticReader(), error(e), errorString(es) {
|
||||
: error(e), errorString(es) {
|
||||
if (error)
|
||||
*error = CXLoadDiag_None;
|
||||
if (errorString)
|
||||
|
|
Loading…
Reference in a new issue