llcppsigfetch:fix nil type of FuncNoProto in C mode
This commit is contained in:
@@ -289,7 +289,6 @@ func (ct *Converter) Convert() (map[string]*ast.File, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (ct *Converter) ProcessType(t clang.Type) ast.Expr {
|
func (ct *Converter) ProcessType(t clang.Type) ast.Expr {
|
||||||
|
|
||||||
if t.Kind >= clang.TypeFirstBuiltin && t.Kind <= clang.TypeLastBuiltin {
|
if t.Kind >= clang.TypeFirstBuiltin && t.Kind <= clang.TypeLastBuiltin {
|
||||||
return ct.ProcessBuiltinType(t)
|
return ct.ProcessBuiltinType(t)
|
||||||
}
|
}
|
||||||
@@ -306,7 +305,8 @@ func (ct *Converter) ProcessType(t clang.Type) ast.Expr {
|
|||||||
expr = &ast.LvalueRefType{X: ct.ProcessType(t.NonReferenceType())}
|
expr = &ast.LvalueRefType{X: ct.ProcessType(t.NonReferenceType())}
|
||||||
case clang.TypeRValueReference:
|
case clang.TypeRValueReference:
|
||||||
expr = &ast.RvalueRefType{X: ct.ProcessType(t.NonReferenceType())}
|
expr = &ast.RvalueRefType{X: ct.ProcessType(t.NonReferenceType())}
|
||||||
case clang.TypeFunctionProto:
|
case clang.TypeFunctionProto, clang.TypeFunctionNoProto:
|
||||||
|
// treating TypeFunctionNoProto as a general function without parameters
|
||||||
// function type will only collect return type, params will be collected in ProcessFuncDecl
|
// function type will only collect return type, params will be collected in ProcessFuncDecl
|
||||||
expr = ct.ProcessFunctionType(t)
|
expr = ct.ProcessFunctionType(t)
|
||||||
case clang.TypeConstantArray, clang.TypeIncompleteArray, clang.TypeVariableArray, clang.TypeDependentSizedArray:
|
case clang.TypeConstantArray, clang.TypeIncompleteArray, clang.TypeVariableArray, clang.TypeDependentSizedArray:
|
||||||
|
|||||||
Reference in New Issue
Block a user