Bill Wendling
8abd1ca8d2
Remove unneeded iostream include.
...
llvm-svn: 109219
2010-07-23 07:19:31 +00:00
Zhongxing Xu
73ede01cad
Change arg type.
...
llvm-svn: 109218
2010-07-23 05:55:01 +00:00
Zhongxing Xu
692ac46a70
Delete unnecessary const_cast.
...
llvm-svn: 109211
2010-07-23 02:54:53 +00:00
Zhongxing Xu
cabfb72654
AnalysisContext is not const.
...
llvm-svn: 109210
2010-07-23 02:49:07 +00:00
Zhongxing Xu
318e40360d
Fix build on Ubuntu 10.04.
...
llvm-svn: 109208
2010-07-23 02:15:08 +00:00
Douglas Gregor
be2d8c6096
Basic plumbing for generating a precompiled preamble for an
...
ASTUnit/CXTranslationUnit. We can't actually use this preamble yet,
however.
llvm-svn: 109202
2010-07-23 00:33:23 +00:00
Fariborz Jahanian
86151343b4
Warn when property ivar lookup finds a global variable
...
of same name. In nonfragile-abi2, lookup accesses a synthesized
ivar. This is a transition warning. Radar 8225011.
llvm-svn: 109197
2010-07-22 23:33:21 +00:00
John McCall
7b5f0fe686
Ted pointed out that this test case could be using access control instead of
...
__attribute__((unavailable)). I've done so, but unfortunately there's still a case
of redundant diagnostics.
llvm-svn: 109192
2010-07-22 22:44:38 +00:00
Sebastian Redl
c67764eb4b
Thread bitstream cursors all the way through the AST reading stuff. This way, reading a trivial 2-element chained file actually works.
...
llvm-svn: 109191
2010-07-22 22:43:28 +00:00
Devang Patel
0884a60eb5
Keep track of artificial scopes introduced by line directives. For example,
...
#line 41 "bar.c"
dummy (1, i);
#line 24 "bar.h"
i = f2 (i);
#line 44 "bar.c"
This is tested by step-line.exp in gdb testsuite.
llvm-svn: 109189
2010-07-22 22:29:16 +00:00
John McCall
775f9f9919
Turn off EH cleanups for __block variables; they caused some internal buildbot
...
failures. There's a radar tracking this.
llvm-svn: 109170
2010-07-22 21:25:44 +00:00
Douglas Gregor
cd8bdd025f
Improve performance during cursor traversal when a region of interest
...
is present.
Rather than using clang_getCursorExtent(), which requires
us to lex the token at the ending position to determine its
length. Then, we'd be comparing [a, b) source ranges that cover the
characters in the range rather than the normal behavior for Clang's
source ranges, which covers the tokens in the range. However, relexing
causes us to read the source file (which may come from a precompiled
header), which is rather unfortunate and affects performance.
In the new scheme, we only use Clang-style source ranges that cover
the tokens in the range. At the entry points where this matters
(clang_annotateTokens, clang_getCursor), we make sure to move source
locations to the start of the token.
Addresses most of <rdar://problem/8049381>.
llvm-svn: 109134
2010-07-22 20:22:31 +00:00
Fariborz Jahanian
6e7e8cc19d
atch for implementation of objective-c's -Wselector
...
warning flag in clang. Little more to do
for a PCH issue. Radar 6507158.
llvm-svn: 109129
2010-07-22 18:24:20 +00:00
Nick Lewycky
a11b4bfcbe
Don't crash when an explicit template instantiation has no user-written
...
arguments. This happens in clang itself where template:
template <typename T> T const *getAs();
gets specialized with:
template<> inline clang::TypedefType const *getAs() { ... }
and there's no TemplateArgumentList.
llvm-svn: 109127
2010-07-22 17:56:53 +00:00
Argyrios Kyrtzidis
7609bca74c
Serialization is implemented, fix comments.
...
llvm-svn: 109124
2010-07-22 17:28:27 +00:00
Argyrios Kyrtzidis
2d8891cd5d
Read/write C++0x static_assert for PCH.
...
llvm-svn: 109123
2010-07-22 17:28:12 +00:00
Sebastian Redl
5c415f3e32
Allow loading declcontext information from any file in the chain. Properly write source locations to dependent files. WIP
...
llvm-svn: 109119
2010-07-22 17:01:13 +00:00
Argyrios Kyrtzidis
165b58181f
Read/write FriendTemplateDecl for PCH.
...
llvm-svn: 109113
2010-07-22 16:04:10 +00:00
Argyrios Kyrtzidis
47cd7a91f4
Support C++ try/catch statements for PCH.
...
llvm-svn: 109112
2010-07-22 16:03:56 +00:00
Zhongxing Xu
f0c133fe88
This patch adds support for tmpfile in StreamChecker. Patch by Lei Zhang.
...
llvm-svn: 109106
2010-07-22 14:01:01 +00:00
Zhongxing Xu
adf644d05e
Make a bunch of new data structures for the new analysis
...
engine of the new translation unit. State marshal is there but no real
work is done. End nodes are passed back.
llvm-svn: 109105
2010-07-22 13:52:13 +00:00
Ted Kremenek
60fe71a9e3
Fix '<rdar://problem/8214263> MakeCXCursor null dereference when body of block is invalid' by checking that the body of a BlockDecl is null before constructing a CXCursor.
...
llvm-svn: 109097
2010-07-22 11:30:19 +00:00
Ted Kremenek
2238bc156e
Update test case to include USRs containing offsets instead of line/columns.
...
llvm-svn: 109096
2010-07-22 11:30:17 +00:00
Ted Kremenek
1eb888e9c3
Switch USR generation to use file offsets instead of line/columns for anonymous symbols. Fixes <rdar://problem/8221557>.
...
llvm-svn: 109095
2010-07-22 11:14:15 +00:00
Chandler Carruth
3c31aa3a44
Fix PR7673 by allowing an empty clobbers section in an ASM statement.
...
llvm-svn: 109087
2010-07-22 07:11:21 +00:00
Chandler Carruth
96f2e9e418
Add alternate names for x86 SIMD intrinsics. These aren't as common, but show
...
up enough to be worth supporting properly. Fixes PR7674.
llvm-svn: 109086
2010-07-22 06:47:28 +00:00
Chandler Carruth
718df592f7
This was still complaining about the length of the string. I've broken it here
...
to try to keep as much logical grouping as possible.
llvm-svn: 109085
2010-07-22 06:29:13 +00:00
Daniel Dunbar
15d8830ea6
tests: Make FileCheck version check that preamble isn't longer than we expected.
...
llvm-svn: 109077
2010-07-22 02:22:24 +00:00
Daniel Dunbar
6d48476446
Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.
...
llvm-svn: 109074
2010-07-22 01:47:22 +00:00
Daniel Dunbar
43d74a3b02
build: Make sure arm_neon.h gets installed.
...
llvm-svn: 109073
2010-07-22 01:19:36 +00:00
Daniel Dunbar
a66a4d10ae
Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally
...
use blocks even when targetting older systems (using runtime checks and weak
linking).
llvm-svn: 109072
2010-07-22 00:40:31 +00:00
Devang Patel
222f4be834
ObjCId is special "struct objc_object". Make this explicit in debug info.
...
This is tested by objc-rbreak.exp in gdb testsuite.
llvm-svn: 109050
2010-07-21 22:41:25 +00:00
Sebastian Redl
4e6c567653
Allow loading macros from any file in the chain. WIP
...
llvm-svn: 109048
2010-07-21 22:31:37 +00:00
Daniel Dunbar
26d0aa19d4
tests: XFAIL this test on win32, someone else can hunt this one down.
...
llvm-svn: 109044
2010-07-21 22:09:09 +00:00
Ted Kremenek
1ddd6d2b6b
Upgrade "'X' is unavailable" from a warning to an error. This matches GCC's behavior. Note that
...
GCC emits a warning instead of an error when using an unavailable Objective-C protocol, so now
Clang's behavior is more strict in this case, but more consistent. We will need to see how much
this fires on real code and determine whether this case should be downgraded to a warning.
Fixes <rdar://problem/8213093>.
llvm-svn: 109033
2010-07-21 20:43:11 +00:00
Sebastian Redl
fa0614458a
Promote some macro-related stuff to per-file data. Fix a cache-inefficient nested loop by inverting the nesting. Store the size of each file in the chain; will need this later for statement offsets.
...
llvm-svn: 109030
2010-07-21 20:07:32 +00:00
Daniel Dunbar
cb08212fd5
tests: Use FileCheck instead of external input; I think this test was failing on
...
Win32 because of line ending differences.
llvm-svn: 109029
2010-07-21 19:40:01 +00:00
Douglas Gregor
99d2cf4838
Introduce a new C API function, clang_parseTranslationUnit(), which
...
will eventually replace
clang_createTranslationUnitFromSourceFile(). The only addition in
clang_parseTranslationUnit() is a set of flags that can control how
the translation unit is loaded. More interesting flags will be coming.
llvm-svn: 109027
2010-07-21 18:52:53 +00:00
Fariborz Jahanian
da2da9c93e
Added extra check when looking for location of '=' in
...
a copy initialization.
llvm-svn: 109025
2010-07-21 18:40:47 +00:00
Fariborz Jahanian
3fd2a555d3
Fix source location of the initializer in
...
a copy initialization. Back out hack in objc rewriter.
fixes radar 8213998.
llvm-svn: 109024
2010-07-21 18:31:47 +00:00
Nate Begeman
45595cf99f
Catch thinko that Daniel Dunbar found.
...
llvm-svn: 109023
2010-07-21 18:11:42 +00:00
Devang Patel
65497583b5
Fix regression caused by r108911.
...
Do not override known debug loc with unknown debug loc.
This is tested by sections.exp in gdb testsuite.
llvm-svn: 109022
2010-07-21 18:08:50 +00:00
Fariborz Jahanian
34c85987fe
Fix a rewriter bug which originates in SemaInit involving
...
Constructor Initialization which computes Source Location
differently now. Fixes radar 8213998.
llvm-svn: 109018
2010-07-21 17:36:39 +00:00
David Chisnall
4715d161c0
Don't crash when sending a message inside a block with the non-fragile ABI (GNU runtime).
...
llvm-svn: 109012
2010-07-21 15:28:28 +00:00
David Chisnall
7fa204edc7
Mark the load after calling objc_msg_lookup_sender() so that it doesn't get optimised away (GNU runtime).
...
llvm-svn: 109010
2010-07-21 12:55:25 +00:00
John McCall
cda666ccd8
Rename LazyCleanup -> Cleanup. No functionality change for these last three
...
commits.
llvm-svn: 109000
2010-07-21 07:22:38 +00:00
John McCall
20141f2d8c
Rip out EHCleanupScope.
...
llvm-svn: 108999
2010-07-21 07:11:21 +00:00
John McCall
7535ee0352
Kill the CleanupBlock API.
...
llvm-svn: 108998
2010-07-21 07:04:01 +00:00
John McCall
65bea08879
Switch the fragile-ABI @finally/@synchronized cleanup over to using a lazy
...
cleanup.
llvm-svn: 108997
2010-07-21 06:59:36 +00:00
John McCall
0d42a41a63
Code simplification.
...
llvm-svn: 108996
2010-07-21 06:45:54 +00:00