Fix static inline and restrict
This commit is contained in:
parent
94acdeb5f1
commit
1e88a3b42e
2 changed files with 3 additions and 2 deletions
|
|
@ -1703,8 +1703,9 @@ proc addDef(gState: State, node: TSNode) =
|
||||||
let
|
let
|
||||||
start = getStartAtom(node)
|
start = getStartAtom(node)
|
||||||
commentNodes = gState.getCommentNodes(node)
|
commentNodes = gState.getCommentNodes(node)
|
||||||
|
fdecl = node[start+1].firstChildInTree("function_declarator")
|
||||||
|
|
||||||
if node[start+1].getName() == "function_declarator":
|
if not fdecl.isNil:
|
||||||
if not gState.noHeader:
|
if not gState.noHeader:
|
||||||
gState.addProc(node[start+1], node[start], commentNodes)
|
gState.addProc(node[start+1], node[start], commentNodes)
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ proc getPreprocessor*(gState: State, fullpath: string) =
|
||||||
|
|
||||||
# Remove gcc special calls
|
# Remove gcc special calls
|
||||||
# https://github.com/tree-sitter/tree-sitter-c/issues/43
|
# https://github.com/tree-sitter/tree-sitter-c/issues/43
|
||||||
args.add @["-D__attribute__(x)=", "-D__restrict=", "-D__extension__=", "-D__inline__=inline",
|
args.add @["-D__attribute__(x)=", "-D__restrict=", "-D__restrict__=", "-D__extension__=", "-D__inline__=inline",
|
||||||
"-D__inline=inline", "-D_Noreturn=", &"{fullpath.sanitizePath}"]
|
"-D__inline=inline", "-D_Noreturn=", &"{fullpath.sanitizePath}"]
|
||||||
|
|
||||||
# Include content only from file
|
# Include content only from file
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue