clang: Enable -Weverything, fix all warnings
This change fixes the following warnings:
```
-Wc++98-compat-extra-semi
-Wc++98-compat-local-type-template-args
-Wc++98-compat-pedantic
-Wc++98-compat
-Wcomma
-Wdeprecated-copy-dtor
-Wexit-time-destructors
-Wextra-semi-stmt
-Wextra-semi
-Wfloat-conversion
-Wfloat-equal
-Wformat-nonliteral
-Wglobal-constructors
-Winconsistent-missing-destructor-override
-Wnon-virtual-dtor
-Wold-style-cast
-Wpadded
-Wreturn-std-move-in-c++11
-Wshadow-field-in-constructor
-Wshadow-uncaptured-local
-Wshift-sign-overflow
-Wsign-conversion
-Wundef
-Wunreachable-code-return
-Wused-but-marked-unused
-Wweak-vtables
-Wzero-as-null-pointer-constant
```
This commit is contained in:
@@ -313,16 +313,6 @@ func (s *cppStruct) writeHeader(w io.Writer) {
|
||||
io.WriteString(w, ";")
|
||||
}
|
||||
|
||||
// constructor
|
||||
io.WriteString(w, "\n\n ")
|
||||
io.WriteString(w, s.name)
|
||||
io.WriteString(w, "();")
|
||||
|
||||
// destructor
|
||||
io.WriteString(w, "\n ~")
|
||||
io.WriteString(w, s.name)
|
||||
io.WriteString(w, "();\n")
|
||||
|
||||
for _, f := range s.fields {
|
||||
if f.desc != "" {
|
||||
io.WriteString(w, "\n // ")
|
||||
@@ -353,18 +343,6 @@ func (s *cppStruct) writeHeader(w io.Writer) {
|
||||
}
|
||||
|
||||
func (s *cppStruct) writeCPP(w io.Writer) {
|
||||
// constructor
|
||||
io.WriteString(w, s.name)
|
||||
io.WriteString(w, "::")
|
||||
io.WriteString(w, s.name)
|
||||
io.WriteString(w, "() = default;\n")
|
||||
|
||||
// destructor
|
||||
io.WriteString(w, s.name)
|
||||
io.WriteString(w, "::~")
|
||||
io.WriteString(w, s.name)
|
||||
io.WriteString(w, "() = default;\n")
|
||||
|
||||
// typeinfo
|
||||
io.WriteString(w, "DAP_IMPLEMENT_STRUCT_TYPEINFO(")
|
||||
io.WriteString(w, s.name)
|
||||
|
||||
Reference in New Issue
Block a user