Commit Graph

15 Commits

Author SHA1 Message Date
SpringsUp
fa834e2f80 [ClangImporter] Teach the importer about more infix operators between
integer constants, and to always look through macro definitions for them.

Also, logical comparisons now return a Boolean.

New operations: +, -, *, /, ^, >>, ==, >, >=, <, <=
2017-01-23 21:02:47 +01:00
Chris Willmore
6d428b8d52 ClangImporter: Import macros of the form '#define FOO CFSTR("bar")'.
rdar://problem/18668528

Swift SVN r23544
2014-11-22 02:33:27 +00:00
Jordan Rose
eb3689051e [ClangImporter] Ban useless macro CF_USE_OSBYTEORDER_H.
rdar://problem/18966078

Swift SVN r23395
2014-11-18 01:55:30 +00:00
Jordan Rose
54c0baa9aa [ClangImporter] Don't recurse infinitely on "#define X X".
<rdar://problem/17182523>

Swift SVN r18772
2014-06-10 01:18:29 +00:00
Jordan Rose
171fc95d27 [ClangImporter] Suppress macros named TRUE and FALSE.
These are too close to "true" and "false" for comfort; they add confusion and
mess up code completion. If the names appear in other contexts, though (such
as enumerator names), we should still bring them through.

<rdar://problem/17080279>

Swift SVN r18670
2014-05-30 18:39:39 +00:00
Jordan Rose
11947c4e86 [test] Change UTF-16 test to not mention the language name.
Just in case. I changed the emoji for "Swift" too, just for Joe.

Swift SVN r17985
2014-05-13 00:48:04 +00:00
Jordan Rose
829d3e6de9 [ClangImporter] Handle macros that use bitshifts, like "(1 << 0)".
<rdar://problem/16202229>

Swift SVN r17462
2014-05-05 17:37:03 +00:00
Jordan Rose
ac15f949d2 [ClangImporter] Import macros that use ~.
This and the previous commit cover <rdar://problem/16521124>.

Swift SVN r17461
2014-05-05 17:37:02 +00:00
Jordan Rose
9e61c4bb62 [ClangImporter] Import NULL, nil, Nil, and ((void*)0) as Swift.nil.
Also, look through one layer of parentheses in general for macros, rather
than special-casing it for each token count.

<rdar://problem/16198517>

Swift SVN r17460
2014-05-05 17:37:00 +00:00
Ted Kremenek
656fd1a2ee Add blacklist for imported macros, which can be extended over time.
Implements:

<rdar://problem/16454306> NS_BLOCKS_AVAILABLE probably should not be imported since by default it's true

Swift SVN r16067
2014-04-08 19:26:17 +00:00
Dmitri Hrybenko
2c96263f02 Clang importer: when importing a macro A that resolves to another macro B, put
the imported macro into the module that owns A, not B

rdar://16449405


Swift SVN r15675
2014-03-31 12:11:19 +00:00
Dmitri Hrybenko
a422886e6f Clang importer: add a workaround so that we don't import literals with ud-suffix
Workaround for rdar://16445608


Swift SVN r15559
2014-03-27 17:59:19 +00:00
Jordan Rose
3d313fb3f0 [ClangImporter] Import macros containing a single NSString literal as String.
Bonus goodness related to the previous commit.

Swift SVN r14665
2014-03-05 00:29:44 +00:00
Jordan Rose
a84f939545 [ClangImporter] Import string macros as CStrings.
Also, pass "-std=gnu11" so that we accept UTF-8 strings in these macros.

<rdar://problem/16198953>

Swift SVN r14664
2014-03-05 00:29:43 +00:00
Dmitri Hrybenko
d35cf945e6 Move Clang importer test SDK to a toplevel dir test/Inputs where it can be
shared between Clang importer and IDE tests


Swift SVN r11292
2013-12-14 02:20:32 +00:00