Skip to content

Commit 477c7ec

Browse files
committed
attempt to fix LLVM 15 error
1 parent 283eb10 commit 477c7ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hs-bindgen/src-internal/HsBindgen/Frontend/Pass/HandleTypedefs.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ handleDecl td decl =
4949
case declKind of
5050
C.DeclTypedef dtd
5151
| C.TypePointer (C.TypeFun args res) <- C.typedefType dtd ->
52-
let derefDecl = C.Decl {
52+
let derefDecl, mainDecl :: C.Decl HandleTypedefs
53+
derefDecl = C.Decl {
5354
declInfo = declInfo' { C.declId = C.DeclId (curName <> "_Deref") (C.NameOriginGenerated (C.AnonId declLoc)) }
5455
, declKind = handleUseSites td
5556
$ C.DeclTypedef $ C.Typedef {
@@ -58,7 +59,7 @@ handleDecl td decl =
5859
}
5960
, declAnn = defaultTypeSpec
6061
}
61-
mainDecl = decl {
62+
mainDecl = C.Decl {
6263
C.declInfo = declInfo'
6364
, C.declKind = C.DeclTypedef $ C.Typedef {
6465
typedefType = C.TypePointer
@@ -68,6 +69,7 @@ handleDecl td decl =
6869
$ C.declInfo derefDecl
6970
, typedefAnn = NoAnn
7071
}
72+
, C.declAnn = declAnn
7173
}
7274
in ( Nothing
7375
, Just [ derefDecl

0 commit comments

Comments
 (0)