mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-03 14:17:45 +00:00
Update dependencies and go1.18 (#1873)
* Update dependencies and go1.18 * Exclude unnecessary linters and update build to go1.18
This commit is contained in:
2
vendor/modernc.org/ccgo/v3/lib/Makefile
generated
vendored
2
vendor/modernc.org/ccgo/v3/lib/Makefile
generated
vendored
@ -116,7 +116,7 @@ edit:
|
||||
|
||||
editor:
|
||||
gofmt -l -s -w *.go
|
||||
go build -v -o $(GOPATH)/bin/ccgo modernc.org/ccgo/v3
|
||||
go build -v -o $(GOPATH)/bin/ccgo3 modernc.org/ccgo/v3
|
||||
go test -c -o /dev/null
|
||||
|
||||
later:
|
||||
|
53
vendor/modernc.org/ccgo/v3/lib/go.go
generated
vendored
53
vendor/modernc.org/ccgo/v3/lib/go.go
generated
vendored
@ -9523,7 +9523,7 @@ func (p *project) postfixExpressionSelectPSelectStruct(f *function, n *cc.Postfi
|
||||
|
||||
func (p *project) postfixExpressionSelectSelect(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
|
||||
// PostfixExpression '.' IDENTIFIER
|
||||
switch k := p.opKind(f, n.PostfixExpression, n.PostfixExpression.Operand.Type()); k {
|
||||
switch k := p.structOrUnion(n); k {
|
||||
case opUnion:
|
||||
p.postfixExpressionSelectSelectUnion(f, n, t, mode, flags)
|
||||
case opStruct:
|
||||
@ -9533,6 +9533,40 @@ func (p *project) postfixExpressionSelectSelect(f *function, n *cc.PostfixExpres
|
||||
}
|
||||
}
|
||||
|
||||
func (p *project) structOrUnion(n *cc.PostfixExpression) opKind {
|
||||
t := n.PostfixExpression.Operand.Type()
|
||||
switch n.Case {
|
||||
case cc.PostfixExpressionSelect: // PostfixExpression '.' IDENTIFIER
|
||||
// ok
|
||||
case cc.PostfixExpressionPSelect: // PostfixExpression "->" IDENTIFIER
|
||||
if t.Kind() == cc.Ptr {
|
||||
t = t.Elem()
|
||||
break
|
||||
}
|
||||
|
||||
p.err(n, "expected pointer type: %s", t)
|
||||
return opStruct
|
||||
}
|
||||
f, path, ok := t.FieldByName2(n.Token2.Src)
|
||||
if !ok {
|
||||
p.err(&n.Token, "unknown field: %s", n.Token2)
|
||||
return opStruct
|
||||
}
|
||||
|
||||
for len(path) > 1 {
|
||||
f = t.FieldByIndex(path[:1])
|
||||
path = path[1:]
|
||||
t = f.Type()
|
||||
}
|
||||
if t.Kind() == cc.Union {
|
||||
// trc("%v: %q %v", n.Token2.Position(), n.Token2.Src, opUnion)
|
||||
return opUnion
|
||||
}
|
||||
|
||||
// trc("%v: %q %v", n.Token2.Position(), n.Token2.Src, opStruct)
|
||||
return opStruct
|
||||
}
|
||||
|
||||
func (p *project) postfixExpressionSelectSelectStruct(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
|
||||
// PostfixExpression '.' IDENTIFIER
|
||||
fld := n.Field
|
||||
@ -12640,6 +12674,23 @@ func (p *project) iterationStatement(f *function, n *cc.IterationStatement) {
|
||||
}
|
||||
p.statement(f, n.Statement, true, false, false, 0)
|
||||
case cc.IterationStatementForDecl: // "for" '(' Declaration Expression ';' Expression ')' Statement
|
||||
if !(f.hasJumps || n.Expression2 != nil && n.Expression2.Case == cc.ExpressionComma) {
|
||||
p.w("{")
|
||||
p.declaration(f, n.Declaration, false)
|
||||
p.w("for ;")
|
||||
if n.Expression != nil {
|
||||
p.expression(f, n.Expression, n.Expression.Operand.Type(), exprBool, 0)
|
||||
}
|
||||
p.w(";")
|
||||
if n.Expression2 != nil {
|
||||
p.expression(f, n.Expression2, n.Expression2.Operand.Type(), exprVoid, fNoCondAssignment)
|
||||
}
|
||||
p.w("{")
|
||||
p.statement(f, n.Statement, false, true, false, 0)
|
||||
p.w("}};")
|
||||
break
|
||||
}
|
||||
|
||||
var ids []*cc.InitDeclarator
|
||||
for list := n.Declaration.InitDeclaratorList; list != nil; list = list.InitDeclaratorList {
|
||||
ids = append(ids, list.InitDeclarator)
|
||||
|
Reference in New Issue
Block a user