mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 18:58:15 +00:00
Revert "[clang] Remove redundant member initialization (NFC)"
This reverts commit 80e2c58749
.
The original patch causes a lot of warnings on gcc like:
llvm-project/clang/include/clang/Basic/Diagnostic.h:1329:3: warning:
base class ‘class clang::StreamingDiagnostic’ should be explicitly
initialized in the copy constructor [-Wextra]
This commit is contained in:
parent
7febd60a90
commit
7485e6c7e9
@ -131,7 +131,8 @@ public:
|
||||
NamedConcept(NamedConcept), ArgsAsWritten(ArgsAsWritten) {}
|
||||
|
||||
ConceptReference()
|
||||
: FoundDecl(nullptr), NamedConcept(nullptr), ArgsAsWritten(nullptr) {}
|
||||
: TemplateKWLoc(), FoundDecl(nullptr), NamedConcept(nullptr),
|
||||
ArgsAsWritten(nullptr) {}
|
||||
|
||||
const NestedNameSpecifierLoc &getNestedNameSpecifierLoc() const {
|
||||
return NestedNameSpec;
|
||||
|
@ -40,7 +40,7 @@ struct SourceRange {
|
||||
|
||||
/// A VariantValue instance annotated with its parser context.
|
||||
struct ParserValue {
|
||||
ParserValue() {}
|
||||
ParserValue() : Range() {}
|
||||
StringRef Text;
|
||||
SourceRange Range;
|
||||
VariantValue Value;
|
||||
|
@ -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) {
|
||||
DiagnosticBuilder(const DiagnosticBuilder &D) : StreamingDiagnostic() {
|
||||
DiagObj = D.DiagObj;
|
||||
DiagStorage = D.DiagStorage;
|
||||
IsActive = D.IsActive;
|
||||
|
@ -46,7 +46,8 @@ public:
|
||||
PartialDiagnostic(unsigned DiagID, DiagStorageAllocator &Allocator_)
|
||||
: StreamingDiagnostic(Allocator_), DiagID(DiagID) {}
|
||||
|
||||
PartialDiagnostic(const PartialDiagnostic &Other) : DiagID(Other.DiagID) {
|
||||
PartialDiagnostic(const PartialDiagnostic &Other)
|
||||
: StreamingDiagnostic(), DiagID(Other.DiagID) {
|
||||
Allocator = Other.Allocator;
|
||||
if (Other.DiagStorage) {
|
||||
DiagStorage = getStorage();
|
||||
|
@ -1475,7 +1475,8 @@ private:
|
||||
/// information that has been parsed prior to parsing declaration
|
||||
/// specifiers.
|
||||
struct ParsedTemplateInfo {
|
||||
ParsedTemplateInfo() : Kind(NonTemplate), TemplateParams(nullptr) {}
|
||||
ParsedTemplateInfo()
|
||||
: Kind(NonTemplate), TemplateParams(nullptr), TemplateLoc() { }
|
||||
|
||||
ParsedTemplateInfo(TemplateParameterLists *TemplateParams,
|
||||
bool isSpecialization,
|
||||
|
@ -1080,7 +1080,7 @@ struct ParsedAttributesWithRange : ParsedAttributes {
|
||||
SourceRange Range;
|
||||
};
|
||||
struct ParsedAttributesViewWithRange : ParsedAttributesView {
|
||||
ParsedAttributesViewWithRange() {}
|
||||
ParsedAttributesViewWithRange() : ParsedAttributesView() {}
|
||||
void clearListOnly() {
|
||||
ParsedAttributesView::clearListOnly();
|
||||
Range = SourceRange();
|
||||
|
@ -64,7 +64,7 @@ namespace clang {
|
||||
SourceLocation TemplateLoc)
|
||||
: Kind(ParsedTemplateArgument::Template),
|
||||
Arg(Template.getAsOpaquePtr()),
|
||||
SS(SS), Loc(TemplateLoc) { }
|
||||
SS(SS), Loc(TemplateLoc), EllipsisLoc() { }
|
||||
|
||||
/// Determine whether the given template argument is invalid.
|
||||
bool isInvalid() const { return Arg == nullptr; }
|
||||
|
@ -36,8 +36,8 @@ class MicrosoftNumberingContext : public MangleNumberingContext {
|
||||
|
||||
public:
|
||||
MicrosoftNumberingContext()
|
||||
: LambdaManglingNumber(0), StaticLocalNumber(0),
|
||||
StaticThreadlocalNumber(0) {}
|
||||
: MangleNumberingContext(), LambdaManglingNumber(0),
|
||||
StaticLocalNumber(0), StaticThreadlocalNumber(0) {}
|
||||
|
||||
unsigned getManglingNumber(const CXXMethodDecl *CallOperator) override {
|
||||
return ++LambdaManglingNumber;
|
||||
|
@ -187,7 +187,7 @@ Sema::Sema(Preprocessor &pp, ASTContext &ctxt, ASTConsumer &consumer,
|
||||
CodeSegStack(nullptr), FpPragmaStack(FPOptionsOverride()),
|
||||
CurInitSeg(nullptr), VisContext(nullptr),
|
||||
PragmaAttributeCurrentTargetDecl(nullptr),
|
||||
IsBuildingRecoveryCallExpr(false), LateTemplateParser(nullptr),
|
||||
IsBuildingRecoveryCallExpr(false), Cleanup{}, LateTemplateParser(nullptr),
|
||||
LateTemplateParserCleanup(nullptr), OpaqueParser(nullptr), IdResolver(pp),
|
||||
StdExperimentalNamespaceCache(nullptr), StdInitializerList(nullptr),
|
||||
StdCoroutineTraitsCache(nullptr), CXXTypeInfoDecl(nullptr),
|
||||
|
@ -6614,7 +6614,7 @@ QualType Sema::FindCompositePointerType(SourceLocation Loc,
|
||||
const Type *ClassOrBound;
|
||||
|
||||
Step(Kind K, const Type *ClassOrBound = nullptr)
|
||||
: K(K), ClassOrBound(ClassOrBound) {}
|
||||
: K(K), Quals(), ClassOrBound(ClassOrBound) {}
|
||||
QualType rebuild(ASTContext &Ctx, QualType T) const {
|
||||
T = Ctx.getQualifiedType(T, Quals);
|
||||
switch (K) {
|
||||
|
@ -1489,7 +1489,8 @@ protected:
|
||||
class raw_self_contained_string_ostream : private string_holder,
|
||||
public raw_string_ostream {
|
||||
public:
|
||||
raw_self_contained_string_ostream() : raw_string_ostream(S) {}
|
||||
raw_self_contained_string_ostream()
|
||||
: string_holder(), raw_string_ostream(S) {}
|
||||
};
|
||||
|
||||
const char LLVMLicenseHeader[] =
|
||||
|
Loading…
Reference in New Issue
Block a user