Fariborz Jahanian
65e6bd6246
More cleanup/refactoring of the rewrite.
...
llvm-svn: 92062
2009-12-23 21:52:32 +00:00
Fariborz Jahanian
4bf727d9e1
Some cleanup and refactoring of rewriter.
...
llvm-svn: 92049
2009-12-23 21:18:41 +00:00
Fariborz Jahanian
cbdcfe802a
This patch concludes rewriteing of __block variables to allow
...
a small test case using Block_copy(...) API to pass.
llvm-svn: 92038
2009-12-23 20:32:38 +00:00
Fariborz Jahanian
25c07fa224
Removed a FIXME comment.
...
llvm-svn: 92028
2009-12-23 19:26:34 +00:00
Fariborz Jahanian
7df3980609
More rewriting of __block variables.
...
llvm-svn: 92027
2009-12-23 19:22:33 +00:00
Chris Lattner
b089c1de55
switch -Werror/-Wfatal-errors error conditions to use diagnostics instead
...
of printf, patch by Christian Adaker!
llvm-svn: 92019
2009-12-23 18:53:37 +00:00
Kovarththanan Rajaratnam
55e74a1a6a
Remove RewriteBlocks. It has been superseded by RewriteObjC
...
llvm-svn: 92014
2009-12-23 18:03:34 +00:00
Steve Naroff
13468371a7
Add support for handling initializers in RewriteObjC::RewriteByRefVar().
...
As the FIXME indicates, RewriteByRefVar() won't work for multiple declarators (in general). I've discussed this with Fariborz and he is aware of the limitation.
llvm-svn: 92007
2009-12-23 17:24:33 +00:00
Zhongxing Xu
d803cc51af
Register call inliner as the last checker.
...
llvm-svn: 91992
2009-12-23 09:15:19 +00:00
Zhongxing Xu
2923046ec4
Migrate the call inliner to the Checker interface.
...
llvm-svn: 91991
2009-12-23 08:56:18 +00:00
Fariborz Jahanian
02e07737a9
Patch to do more rewrite of __block variables.
...
Still WIP.
llvm-svn: 91977
2009-12-23 02:07:37 +00:00
Chris Lattner
801fda871b
implement -W[no-]fatal-errors, patch by Christian Adåker!
...
llvm-svn: 91938
2009-12-22 23:12:53 +00:00
Douglas Gregor
dc72875d25
Serialize the NoReturn bit on FunctionTypes for precompiled headers
...
llvm-svn: 91911
2009-12-22 18:11:50 +00:00
Anders Carlsson
3caa2b486d
Work around PR5514.
...
llvm-svn: 91891
2009-12-22 06:13:42 +00:00
Fariborz Jahanian
8120346c57
Template code for rewrite of __block variables - wip.
...
llvm-svn: 91865
2009-12-22 00:48:54 +00:00
Fariborz Jahanian
e175eeb117
Providing support for rewriting of block copy/dispose of
...
imported block variables. WIP.
llvm-svn: 91856
2009-12-21 23:31:42 +00:00
Daniel Dunbar
91b640abfc
Fix a few MSVC warnings.
...
llvm-svn: 91714
2009-12-18 20:58:47 +00:00
Torok Edwin
d0139fd3e5
Debian has x86_64-linux-gnu, not x86_64-pc-linux-gnu, so add it.
...
llvm-svn: 91698
2009-12-18 17:43:54 +00:00
Torok Edwin
029707885c
Move the 4.4.2 c++ include search to the top, otherwise it was picking the 4.1.3
...
dirs on my system. Which is wrong, since it was missing the x86_64-pc-linux-gnu
suffix.
llvm-svn: 91694
2009-12-18 17:29:14 +00:00
Daniel Dunbar
a7d0231b66
clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.
...
llvm-svn: 91671
2009-12-18 06:30:12 +00:00
Daniel Dunbar
24c7f5efc5
Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
...
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags
llvm-svn: 91661
2009-12-18 02:43:17 +00:00
Fariborz Jahanian
6ab7ed40c7
Implemented rewriting of invocation of a block ivar.
...
(radar 7482224).
llvm-svn: 91652
2009-12-18 01:15:21 +00:00
Daniel Dunbar
15cef0ed42
Fix -fdollars-in-identifiers Clang translation.
...
llvm-svn: 91562
2009-12-16 20:10:18 +00:00
Douglas Gregor
4f4b186215
When value-initializing a class with no user-defined constructors but
...
with a non-trivial default constructor, zero-initialize the storage
and then call the default constructor. Fixes PR5800.
llvm-svn: 91548
2009-12-16 18:50:27 +00:00
Nuno Lopes
13c88c7269
implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators.
...
feel free to chage the name to this lengthy argument
llvm-svn: 91543
2009-12-16 16:59:22 +00:00
Zhongxing Xu
686b8458f4
Expose C++ methods to GRExprEngine.
...
llvm-svn: 91506
2009-12-16 05:29:59 +00:00
Douglas Gregor
85dabae6ad
Switch the C++ new expression over to InitializationSequence, rather
...
than using its own partial implementation of initialization.
Switched CheckInitializerTypes over to
InitializedEntity/InitializationKind, to help move us closer to
InitializationSequence.
Added InitializedEntity::getName() to retrieve the name of the entity,
for diagnostics that care about such things.
Implemented support for default initialization in
InitializationSequence.
Clean up the determination of the "source expressions" for an
initialization sequence in InitializationSequence::Perform.
Taught CXXConstructExpr to store more location information.
llvm-svn: 91492
2009-12-16 01:38:02 +00:00
Fariborz Jahanian
d1a2d5719a
Implement conditional block invocation rewrite
...
and some clean up and a block rewriter test.
llvm-svn: 91435
2009-12-15 17:30:20 +00:00
Zhongxing Xu
765f3e4f35
Add comments.
...
llvm-svn: 91430
2009-12-15 09:32:42 +00:00
Zhongxing Xu
950978a44b
Remove displayProgress parameter.
...
llvm-svn: 91429
2009-12-15 09:09:49 +00:00
Daniel Dunbar
a5a166d01a
Add -resource-dir to clang -cc1, this allows the base directory for compiler
...
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.
llvm-svn: 91370
2009-12-15 00:06:45 +00:00
Daniel Dunbar
8d4a202aad
Lift builtin-include-path logic out of ASTUnit::LoadFromCommandLine and fix CIndex to pass in the right directory (previously it was using the path to the main executable, which generally is wrong).
...
llvm-svn: 91238
2009-12-13 03:46:13 +00:00
Daniel Dunbar
d613677ec9
CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.
...
llvm-svn: 91237
2009-12-13 03:45:58 +00:00
Daniel Dunbar
efa39f7db1
Backend: Switch to using TargetOptions or TargetMachine to set some options instead of llvm::cl.
...
llvm-svn: 91229
2009-12-12 23:01:36 +00:00
Jeffrey Yasskin
1615d45daa
Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
...
no extra safety anyway.
llvm-svn: 91207
2009-12-12 05:05:38 +00:00
Eli Friedman
3950e8c411
Fix for PR4642: move work in HTMLPrinter out of the destructor.
...
llvm-svn: 91205
2009-12-12 03:36:52 +00:00
Mike Stump
d954638f02
Implement runtime checks for undefined behavior. WIP.
...
This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:
T a[I];
a[i] abort when i < 0 or i >= I.
Future stuff includes shifts by >= bitwidth amounts.
llvm-svn: 91198
2009-12-12 01:27:46 +00:00
Ted Kremenek
752ecd8818
We should only scan for nested blocks if we are analyzing the body of a function/method.
...
llvm-svn: 91196
2009-12-12 01:04:14 +00:00
Daniel Dunbar
520d1e6c6b
Update docs/comments/utils/examples to refer to clang -cc1 instead of clang-cc.
...
llvm-svn: 91176
2009-12-11 23:04:35 +00:00
Nuno Lopes
221c1fd63e
spread 'const' love to some variables. this considerably reduces the amount of dirty data around.
...
llvm-svn: 91002
2009-12-10 00:07:02 +00:00
John McCall
5677499fbf
First pass at implementing C++ enum semantics: calculate (and store) an
...
"integer promotion" type associated with an enum decl, and use this type to
determine which type to promote to. This type obeys C++ [conv.prom]p2 and
is therefore generally signed unless the range of the enumerators forces
it to be unsigned.
Kills off a lot of false positives from -Wsign-compare in C++, addressing
rdar://7455616
llvm-svn: 90965
2009-12-09 09:09:27 +00:00
Ted Kremenek
06ba78d07d
Fix crash in DisplayFunction(). ObjCInterfaceDecls can also get passed to this function, but we don't want to display them.
...
llvm-svn: 90944
2009-12-09 03:45:19 +00:00
Chris Lattner
53d80e2c07
Neil points out that this could be simplified, do it.
...
llvm-svn: 90927
2009-12-09 02:08:14 +00:00
Daniel Dunbar
e07f152e6d
Increase inlining threshold at -O3, to match llvm-gcc.
...
llvm-svn: 90897
2009-12-08 23:15:55 +00:00
Benjamin Kramer
c6ad84cb3c
Twinify InitHeaderSearch::AddPath and use it in C++ include path generation.
...
llvm-svn: 90853
2009-12-08 12:38:20 +00:00
Benjamin Kramer
141c7f987a
Use StringRefs in InitHeaderSearch::AddDelimitedPaths.
...
llvm-svn: 90852
2009-12-08 12:11:06 +00:00
John McCall
ce54657e95
DeclRefExpr stores a ValueDecl internally.
...
Template instantiation can re-use DeclRefExprs.
llvm-svn: 90848
2009-12-08 09:08:17 +00:00
Eli Friedman
897bc03305
Small compatibility fix for -print-decl-contexts.
...
llvm-svn: 90838
2009-12-08 06:22:37 +00:00
Jeffrey Yasskin
567ae47b4a
Remove several .c_str() to be forward-compatible with StringRef.
...
llvm-svn: 90822
2009-12-08 01:46:24 +00:00
Ted Kremenek
6818991d71
Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.
...
llvm-svn: 90810
2009-12-07 22:06:12 +00:00