Chris Lattner
c766b6edd1
fix lookup of bits/c++config.h on mingw, patch by Ismail Donmez!
...
llvm-svn: 112969
2010-09-03 16:45:53 +00:00
Francois Pichet
a5a5f470f1
First test commit by Francois Pichet. _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES is not a predefined macro, remove it.
...
llvm-svn: 112953
2010-09-03 08:42:01 +00:00
Dawn Perchik
68bb1b441f
Add support for Borland extensions via option -fborland-extensions
...
(original patch r112791 was reverted due to a bug).
llvm-svn: 112915
2010-09-02 23:59:25 +00:00
Dawn Perchik
f0882f90f3
Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
...
llvm-svn: 112797
2010-09-02 02:18:55 +00:00
Dawn Perchik
1fcc18c7bc
Add support for Borland extensions via option -fborland-extensions
...
llvm-svn: 112791
2010-09-02 01:12:01 +00:00
Benjamin Kramer
2bd4cee516
StringRefize.
...
llvm-svn: 112718
2010-09-01 17:28:48 +00:00
Chris Lattner
988fd16060
add a new version of mingw, patch by İsmail "cartman" Dönmez
...
in PR8049
llvm-svn: 112710
2010-09-01 15:51:58 +00:00
Anton Korobeynikov
1b80c2aaee
Add NetBSD include search path
...
llvm-svn: 112663
2010-08-31 22:39:50 +00:00
Douglas Gregor
2b1bbecb6b
Predeclare class type_info in Microsoft mode, from Francois Pichet!
...
llvm-svn: 112478
2010-08-30 14:44:26 +00:00
Duncan Sands
f610b5b622
Straighten out target triples provided on the command line
...
before using them.
llvm-svn: 112468
2010-08-30 09:42:39 +00:00
Douglas Gregor
28c7843ec4
Suggest "const" and "volatile" code completions after a function
...
declarator, the very definition of "low-hanging fruit".
llvm-svn: 112274
2010-08-27 17:35:51 +00:00
Dan Gohman
8b4c320778
createMainFileID doesn't need its IncludePos argument, since
...
the main file isn't an included file, and the IncludePos is
always SourceLocation().
llvm-svn: 112269
2010-08-27 15:44:11 +00:00
Douglas Gregor
67c692cc3d
Implement code completion for @selector expressions
...
llvm-svn: 112186
2010-08-26 15:07:07 +00:00
Douglas Gregor
49f67ce4b3
Move the sorting of code-completion results out of the main path and
...
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.
3rd try. How embarrassing.
llvm-svn: 112180
2010-08-26 13:48:20 +00:00
Daniel Dunbar
bef185c835
Revert r112149, "Move the sorting of code-completion results out of the main
...
path and ...", it is failing tests.
llvm-svn: 112161
2010-08-26 03:53:50 +00:00
Douglas Gregor
78ecc499eb
Move the sorting of code-completion results out of the main path and
...
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
Provide a libclang function that sorts the results.
llvm-svn: 112149
2010-08-26 02:23:45 +00:00
Douglas Gregor
1099865124
Revert "Move the sorting of code-completion results out of the main path and
...
into the clients", because the C standard library sucks. Where's my
stable sort, huh?
llvm-svn: 112121
2010-08-26 00:30:24 +00:00
Douglas Gregor
ebb7c84891
Move the sorting of code-completion results out of the main path and
...
into the clients, e.g., the printing code-completion consumer and
c-index-test. Clients may want to re-sort the results anyway.
llvm-svn: 112095
2010-08-25 22:15:42 +00:00
Douglas Gregor
0de55cecb2
When combining the code-completion results from Sema long with the
...
code-completion results cached by ASTUnit, sort the resulting result
set. This makes testing far, far easier, so this commit also includes
tests for the previous few fixes.
llvm-svn: 112070
2010-08-25 18:41:16 +00:00
Douglas Gregor
ea14705c8c
Add a missing case
...
llvm-svn: 112065
2010-08-25 18:04:30 +00:00
Douglas Gregor
8e817b6a3a
Fix an off-by-one error when computing the precompiled preamble for
...
code completion. We were allowing the preamble to include the line
that we're code-completing on. Again, testcase is forthcoming.
llvm-svn: 112064
2010-08-25 18:04:15 +00:00
Douglas Gregor
8850aa3f67
Make the cursor kind of macro-name-only completions produced by
...
ASTUnit match those produced directly by code completion. Test case is
forthcoming.
llvm-svn: 112063
2010-08-25 18:03:13 +00:00
John McCall
276321a9ec
Teach Sema to live without CodeCompleteConsumer.h.
...
llvm-svn: 112028
2010-08-25 06:19:51 +00:00
Daniel Dunbar
d435275c59
Frontend: Add basic -H support.
...
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.
llvm-svn: 111983
2010-08-24 22:44:13 +00:00
Chris Lattner
576048657e
correct the -isystem option to not add the -isysroot path. Only the weird
...
-iwithsysroot flag should do that. This fixes rdar://8345942
llvm-svn: 111979
2010-08-24 22:27:37 +00:00
Douglas Gregor
ec00a26855
Implement code completion for preprocessor expressions and in macro
...
arguments.
llvm-svn: 111976
2010-08-24 22:20:20 +00:00
Chris Lattner
4b2164cab8
Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
...
Instead of implementing -isystem, I accidentally implemented this cousin. Next
up is to implement -isystem right.
llvm-svn: 111966
2010-08-24 21:09:16 +00:00
Douglas Gregor
127851084d
Implement preprocessor code completion where a macro name is expected,
...
e.g., after #ifdef/#ifndef or #undef, or inside a defined <macroname>
expression in a preprocessor conditional.
llvm-svn: 111954
2010-08-24 20:21:13 +00:00
Peter Collingbourne
85dd0bd18d
Move ExecuteCompilerInvocation to a new library FrontendTool
...
r110903 introduced a dependency from Frontend to every library that
declared an Action by introducing Action references that previously
resided in the driver in the file ExecuteCompilerInvocation.cpp.
This patch moves ExecuteCompilerInvocation to a new library named
FrontendTool which is intended to bear these dependencies.
llvm-svn: 111873
2010-08-24 00:31:22 +00:00
Douglas Gregor
f757a12dfc
Introduce new libclang API functions that determine the availability
...
of a cursor or code-completion result, e.g., whether that result
refers to an unavailable, deleted, or deprecated declaration.
llvm-svn: 111858
2010-08-23 23:00:57 +00:00
Douglas Gregor
2529b55b4d
Don't include macro results when we're completing a declarator.
...
llvm-svn: 111830
2010-08-23 19:33:40 +00:00
Douglas Gregor
c49f5b2f11
Introduce a new code-completion point when we're parsing a
...
declarator. Here, we can only see a few things (e.g., cvr-qualifiers,
nested name specifiers) and we do not want to provide other non-macro
completions. Previously, we would end up in recovery mode and would
provide a large number of non-relevant completions.
llvm-svn: 111818
2010-08-23 18:23:48 +00:00
John McCall
1c456c89dc
Abstract out member-pointer creation. I'm really unhappy about the current
...
duplication between the constant and non-constant paths in all of this.
Implement ARM ABI semantics for member pointer constants and conversion.
llvm-svn: 111772
2010-08-22 06:43:33 +00:00
Eli Friedman
04831926ec
Detabify.
...
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
Michael J. Spencer
b186bc3c4b
Visual Studio tools used on win32 hosts when targeting win32.
...
llvm-svn: 111748
2010-08-21 21:55:07 +00:00
Michael J. Spencer
1d9c76d637
Fix typo in comment.
...
llvm-svn: 111729
2010-08-21 06:05:06 +00:00
John McCall
8b0666cf79
Another step in the process of making the parser depend on Sema:
...
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.
llvm-svn: 111667
2010-08-20 18:27:03 +00:00
Douglas Gregor
12e2a06824
Eliminate some extraneous whitespace in the machine-parseable Fix-It output.
...
llvm-svn: 111610
2010-08-20 03:17:33 +00:00
Douglas Gregor
b97b666c47
When performing code-completion in the presence of a preamble, make
...
sure to (1) actually use the remapped files we were given rather
than old data, and (2) keep the remapped files alive until the
code-completion results are destroyed. Big thanks to Daniel for the
test case.
llvm-svn: 111597
2010-08-20 00:59:43 +00:00
Douglas Gregor
7b02b583b2
When we decide not to reuse a precompiled preamble, clear out the
...
previous precompiled preamble completely. Fixes <rdar://problem/8330950>.
llvm-svn: 111590
2010-08-20 00:02:33 +00:00
Douglas Gregor
eec975ce5a
Add machine-parseable Fix-It output as part of diagnostics, under the
...
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!
llvm-svn: 111557
2010-08-19 20:24:43 +00:00
Daniel Dunbar
438c7724f9
Fix a loop overrun in ComputePreamble when the last remapped file was erased,
...
and reenable crash recovery test.
- Reparsing is still very crashy / weird, so I had to sprinkle random code into
the remapped input to get it to do what I want (i.e., crash!).
llvm-svn: 111550
2010-08-19 19:40:40 +00:00
Douglas Gregor
a0734c5fbd
Plug a leak when precompiling the preamble in ASTUnit.
...
llvm-svn: 111504
2010-08-19 01:33:06 +00:00
Douglas Gregor
4740c4501e
Make sure to initialize ASTUnit::UnsafeToFree
...
llvm-svn: 111490
2010-08-19 00:45:44 +00:00
Sebastian Redl
f5b1346738
Rename the ASTReader header files.
...
llvm-svn: 111474
2010-08-18 23:57:17 +00:00
Sebastian Redl
d44cd6adba
More PCH -> AST renaming.
...
llvm-svn: 111472
2010-08-18 23:57:06 +00:00
Sebastian Redl
3e31c72497
Rename various classes from PCH to AST.
...
llvm-svn: 111471
2010-08-18 23:56:56 +00:00
Sebastian Redl
2c499f6561
Rename PCHReader to ASTReader.
...
llvm-svn: 111467
2010-08-18 23:56:43 +00:00
Sebastian Redl
1914c6fef8
Rename PCHWriter.h to ASTWriter.h
...
llvm-svn: 111466
2010-08-18 23:56:37 +00:00
Sebastian Redl
55c0ad5772
Rename PCHWriter to ASTWriter
...
llvm-svn: 111463
2010-08-18 23:56:21 +00:00