Andrew Kelley
a95dce15ae
Merge remote-tracking branch 'origin/master' into llvm10
2020-01-29 23:33:12 -05:00
Feix Weiglhofer
a4a9330648
translate-c: Don't make const parameters mutable. ( #4273 )
...
* translate-c: Remove arg-prefix from const parameters.
* translate-c: Add unittest for const parameters.
2020-01-24 15:32:32 -05:00
Andrew Kelley
72589dbffe
zig_clang builds with llvm 10
2020-01-23 17:22:13 -05:00
Andrew Kelley
32dafbdadc
zig_clang: update StmtClass to llvm 10
2020-01-23 16:52:40 -05:00
Andrew Kelley
3588f99719
zig_clang: update TypeClass enum
2020-01-23 14:35:12 -05:00
LemonBoy
a284be3f69
Fix unsafe cast in translate_c
...
Fixes #4250
2020-01-22 17:58:57 -05:00
Andrew Kelley
fbe6af81fd
Merge remote-tracking branch 'origin/master' into llvm10
2020-01-16 13:01:36 -05:00
LemonBoy
0267afa9c0
Fix garbled error messages from clang
2020-01-16 12:16:30 -05:00
LemonBoy
34ae1d9aa8
Fix unsafe cast in translate_c
...
* Handle EmptyDecls to clean up the generated code
Closes #4143
2020-01-11 15:51:10 -05:00
LemonBoy
95619ecb8c
Stop dropping errors from clang
...
* Refactor the error-writing code to be more compact and flexible
2020-01-11 15:48:32 -05:00
LemonBoy
570ffc470e
Handle forward-declared functions
...
Closes #4130
2020-01-10 16:34:40 -05:00
LemonBoy
fd7e69a2c0
More translate-c fixes
...
* Translate OpaqueValueExpr
* Translate BinaryConditionalOperator
* Fix translation of boolean->int casts
* Reoder some tokens to avoid rendering errors
2020-01-08 08:43:37 +01:00
via
9390e8b848
Preserve packed attribute in C translated struct ( #4085 )
...
* Preserve packed attribute in C translated struct
* Add tests for packed C struct
2020-01-07 02:36:07 -05:00
Andrew Kelley
baaef7ed97
Merge pull request #4083 from LemonBoy/better-stdbool
...
Better _Bool translation
2020-01-06 19:21:55 -05:00
LemonBoy
1dc25d7550
Translate anonymous union/struct
2020-01-06 19:17:47 -05:00
LemonBoy
cd39f6df95
Better _Bool translation
2020-01-06 00:12:18 +01:00
LemonBoy
6ff70d3c31
Better InitListExpr translation
2020-01-05 17:39:29 -05:00
LemonBoy
b0fa2ff853
Translate struct/union initializer expressions
2020-01-02 14:16:39 -05:00
LemonBoy
d908ca4823
Translate align attribute
2020-01-02 12:33:19 -05:00
LemonBoy
8e89bdfe99
Translate linksection attribute
2020-01-02 12:32:51 -05:00
Andrew Kelley
88c5e2a96e
translate-c: don't export inline functions
2020-01-01 20:54:17 -05:00
LemonBoy
cbfd66f68a
Don't crash when parsing invalid files
2019-12-30 19:17:19 -05:00
Vexu
122a9bad39
translate-c-2 fix some casts
2019-12-19 01:38:42 +02:00
Vexu
daa22d42b0
translate-c-2 floats
2019-12-17 11:28:56 +02:00
Vexu
eb057ef41c
translate-c-2 dont eval init expr
2019-12-13 15:07:10 +02:00
daurnimator
ed956b5812
translate-c: add support for MacroQualified definitions
2019-11-19 01:05:17 +00:00
LemonBoy
230d27c1cd
Adapt to clang API additions
2019-10-13 11:08:16 -04:00
LemonBoy
3ea0a76fb6
More clang API changes
2019-10-12 16:25:51 +02:00
LemonBoy
6439759298
Add/shuffle several enum members to match Clang's API
2019-10-12 16:15:58 +02:00
Andrew Kelley
a7c9aa7ddb
finish conversion of translate_c.cpp to use zig_clang.h
...
See #1964
translate_c.cpp now exclusively uses the clang API via zig_clang.h
shaves off 5 seconds from building zig when translate_c.cpp
(or any h files it uses) change.
2019-10-02 19:21:40 -04:00
Andrew Kelley
f84086132f
more conversion of translate_c.cpp to use zig_clang.h
...
Progress: 96%
See #1964
2019-10-02 02:02:31 -04:00
Andrew Kelley
c1a05f0581
translate-c: make trans_implicit_cast_expr use zig_clang.h
...
See #1964
2019-10-01 17:33:11 -04:00
Andrew Kelley
e816d592e8
update zig codebase to llvm 9
2019-07-17 17:47:39 -04:00
hryx
f845994839
transBinaryOperator: Add, Sub
2019-06-23 17:17:21 -07:00
hryx
4ae95d7ffc
Translate assignment BinaryOperator statements
2019-06-22 17:29:36 -07:00
hryx
0f545e5a2b
transReturnStmt
2019-06-10 23:06:54 -07:00
hryx
84e479d94f
(broken) local var decls, integer literals (part)
2019-06-09 23:35:48 -07:00
hryx
1f82c7ba22
transCStyleCastExpr
2019-06-08 15:54:15 -07:00
hryx
3e14f86f9e
Implement missing clang functions from last commit
2019-05-29 15:33:44 -07:00
hryx
b558d0996a
expr: DeclRefExpr
2019-05-27 19:20:23 -07:00
hryx
3bbee1ba2e
expr: BitCast for ImplicitCastExpr
2019-05-27 14:38:09 -07:00
hryx
9c437f9032
var decl: ImplicitCastExpr
2019-05-26 19:14:50 -07:00
hryx
1a8f8c6262
var decl: init node
2019-05-26 17:36:47 -07:00
hryx
c79b8aeaef
var decl: threadlocal
2019-05-26 17:05:49 -07:00
hryx
99f0b28d39
var decl: mut_token, create child scope
2019-05-26 16:51:25 -07:00
hryx
fceedada5c
WIP translate var decl
2019-05-26 15:43:13 -07:00
Andrew Kelley
07d0aee11a
clang C API wrapper: small progress
2019-05-16 12:55:45 -04:00
Andrew Kelley
3aa43dc31c
update libclang C API wrapper
2019-05-15 11:57:55 -04:00
Andrew Kelley
5f4c3e6557
stage2 translate-c: simple function definitions
...
See #1964
2019-05-10 23:35:46 -04:00
Andrew Kelley
a6f7a9ce2b
translate-c: we have our first test of self-hosted
...
See #1964
2019-05-10 16:03:54 -04:00