Douglas Gregor
e10f0e5670
If we fail to create a temporary file for the precompiled preamble,
...
just abort creation of the precompiled preamble rather than doing
silly things. This is the second part of the fix for the weird
preamble-related failures on Windows. Big thanks to Francois Pichet
for the great detective work!
llvm-svn: 113697
2010-09-11 17:56:52 +00:00
Nuno Lopes
d4e42830cb
add latest gentoo gcc path
...
llvm-svn: 113696
2010-09-11 17:51:45 +00:00
Douglas Gregor
ce3449f5bd
Tweak GetPreamblePCHPath() to more closely match the behavior of the
...
Windows GetTempPath() function, and be sure to create the directory in
which the precompiled preamble will reside before creating the
temporary file itself.
llvm-svn: 113695
2010-09-11 17:51:16 +00:00
Douglas Gregor
ca3682d486
Make sure we're producing a newline in the preprocessed output before
...
emitting a #pragma, whenever one is needed. Fixes <rdar://problem/8417307>.
llvm-svn: 113648
2010-09-10 22:27:29 +00:00
Michael J. Spencer
0881f4a367
CMake: Update to use standard CMake dependency tracking facilities instead
...
of whatever we were using before...
llvm-svn: 113631
2010-09-10 21:13:16 +00:00
Tom Care
4545b2df42
Added AnalyzerStatsChecker, a path sensitive check that reports visitation statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.
...
llvm-svn: 113568
2010-09-10 00:44:44 +00:00
Douglas Gregor
c7d6576d54
When we parse a pragma, keep track of how that pragma was originally
...
spelled (#pragma, _Pragma, __pragma). In -E mode, use that information
to add appropriate newlines when translating _Pragma and __pragma into
#pragma, like GCC does. Fixes <rdar://problem/8412013>.
llvm-svn: 113553
2010-09-09 22:45:38 +00:00
Daniel Dunbar
0166c95fdd
Frontend: Add -cxx-system-include option which can be used to specify an
...
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().
llvm-svn: 113505
2010-09-09 17:38:22 +00:00
Daniel Dunbar
1cf2d54987
Fix indentation.
...
llvm-svn: 113504
2010-09-09 17:38:18 +00:00
Douglas Gregor
c9199f522f
Clean up CMake dependencies
...
llvm-svn: 113489
2010-09-09 15:44:58 +00:00
Daniel Dunbar
c6f6df088f
Add another missing CMake dependency.
...
llvm-svn: 113443
2010-09-08 23:40:30 +00:00
Douglas Gregor
b2f0713ddc
Clean up some of the CMake dependencies
...
llvm-svn: 113416
2010-09-08 21:40:53 +00:00
Daniel Dunbar
04ebde017f
Frontend/-H: Add comment on why I used a temporary string here.
...
llvm-svn: 113379
2010-09-08 18:19:55 +00:00
Steven Watanabe
2ba828f36d
Tell the VS headers that char16_t and char32_t are keywords, so yvals.h doesn't try to define them as typedefs.
...
llvm-svn: 113126
2010-09-05 23:16:22 +00:00
Chris Lattner
9795b39113
zap dead code.
...
llvm-svn: 113074
2010-09-04 18:12:20 +00:00
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