Daniel Dunbar
804c0441c2
Handle complex types in ASTContext::mergeTypes
...
llvm-svn: 63238
2009-01-28 21:22:12 +00:00
Ted Kremenek
f675864e3c
Add autorelease test case.
...
llvm-svn: 63237
2009-01-28 21:20:48 +00:00
Ted Kremenek
62224c1d7f
Add more PTH diagnostics for invalid PTH files, etc.
...
llvm-svn: 63232
2009-01-28 21:02:43 +00:00
Ted Kremenek
3b0589e4b4
Enhance PTHManager::Create() to take an optional Diagnostic* argument that can be used to report issues such as a missing PTH file.
...
llvm-svn: 63231
2009-01-28 20:49:33 +00:00
Ted Kremenek
5241832d1d
Fix TextDiagnosticPrinter::HandleDiagnostic to handle invalid FullSourceLocs that do not have a SourceManager.
...
llvm-svn: 63230
2009-01-28 20:47:47 +00:00
Ted Kremenek
bf16554640
Add method FullSourceLoc::getBufferData().
...
llvm-svn: 63229
2009-01-28 20:46:26 +00:00
Ted Kremenek
3587d0b762
Tweak doxygen comment. No functionality change.
...
llvm-svn: 63228
2009-01-28 20:45:37 +00:00
Steve Naroff
16c8e598ae
Name change (isTypeName->getTypeName).
...
Since it doesn't return a bool, is shouldn't be prefixed with 'is'.
llvm-svn: 63226
2009-01-28 19:39:02 +00:00
Daniel Dunbar
ad0d48d372
Fix test case (for -### printing version)
...
llvm-svn: 63223
2009-01-28 19:30:43 +00:00
Daniel Dunbar
36ccb30a35
ccc: Support -v; invent a version number for ccc for now, will be
...
shared with clang eventually.
llvm-svn: 63220
2009-01-28 19:26:20 +00:00
Steve Naroff
b04867265c
Change Parser::ParseFunctionDeclarator() to annotate typename tokens.
...
This removes ~10% of the calls to Sema::isTypeName(), which amount to a little less than a 1% reduction in usertime (for Cocoa.h).
llvm-svn: 63219
2009-01-28 19:16:40 +00:00
Fariborz Jahanian
b042a59230
Some refactoring of common code. No change in functionality.
...
llvm-svn: 63218
2009-01-28 19:12:34 +00:00
Sebastian Redl
ed8f200318
Implement pointer to member handling in static_cast.
...
Fix a stupid mistake in UnwrapSimilarPointers that made any two member pointers compatible as long as the pointee was the same.
Make a few style corrections as suggested by Chris.
llvm-svn: 63215
2009-01-28 18:33:18 +00:00
Douglas Gregor
fb03466388
Complete semantic checking for typedef redeclarations in C++. The
...
rules are slightly different than in C, and now we handle both
dialects properly.
llvm-svn: 63211
2009-01-28 17:15:10 +00:00
Steve Naroff
aec0f37d11
Remove 'NamespaceNameOnly' argument to Sema::LookupDecl(). It is unused.
...
Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert.
llvm-svn: 63210
2009-01-28 16:09:22 +00:00
Steve Naroff
49f97d7eb2
Remove 'enableLazyBuiltinCreation' argument to Sema::LookupDecl(). It is unused.
...
Even though Sema::LookupDecl() is deprecated, it's still used all over the place. Simplifying the interface will make it easier to understand/optimize/convert.
llvm-svn: 63208
2009-01-28 15:51:12 +00:00
Ted Kremenek
cdca288cf8
Updated checker build.
...
llvm-svn: 63200
2009-01-28 15:05:42 +00:00
Ted Kremenek
882214b676
Update comment.
...
llvm-svn: 63192
2009-01-28 07:10:33 +00:00
Chris Lattner
22ebe7ba66
long long and double have 64-bit alignment on x86-64.
...
llvm-svn: 63191
2009-01-28 06:58:19 +00:00
Chris Lattner
5fdc227326
add some basic file headers
...
llvm-svn: 63188
2009-01-28 06:31:57 +00:00
Ted Kremenek
4daeccf28f
retain/release checker: Improve diagnostics to indicate that CF objects are not automatically garbage collected.
...
llvm-svn: 63187
2009-01-28 06:25:48 +00:00
Ted Kremenek
f0ec316a04
retain/release checker: Indicate whether a tracked object is a Core Foundation or Objective-C object.
...
llvm-svn: 63186
2009-01-28 06:06:36 +00:00
Chris Lattner
e1d49c2572
add diagnostics files to xcode proj
...
llvm-svn: 63185
2009-01-28 06:02:52 +00:00
Ted Kremenek
bdaa384453
retain/release checker: More diagnostic refactoring.
...
llvm-svn: 63184
2009-01-28 06:01:42 +00:00
Ted Kremenek
aeb115f93a
retain/release checker: Embed an "object type" into the RetEffect/RetVal objects to help distinguish between Objective-C and Core Foundation objects (for better diagnostics).
...
llvm-svn: 63183
2009-01-28 05:56:51 +00:00
Chris Lattner
64d8fc25d6
fix a crash I introduced, thanks to Ted for the awesome reduced
...
testcase :)
llvm-svn: 63182
2009-01-28 05:42:38 +00:00
Ted Kremenek
21114f21c4
retain/release checker: More cleanups (no real functionality change).
...
llvm-svn: 63181
2009-01-28 05:29:13 +00:00
Ted Kremenek
ff3c2bdfee
Fix diagnostic truncated by my last patch.
...
llvm-svn: 63180
2009-01-28 05:18:08 +00:00
Ted Kremenek
758fda632b
retain/release checker: More diagnostic refactoring.
...
llvm-svn: 63179
2009-01-28 05:15:02 +00:00
Ted Kremenek
c4118ac79c
retain/release checker: Output the name of the function that allocates an object.
...
llvm-svn: 63178
2009-01-28 05:06:46 +00:00
Ted Kremenek
424c61ff6d
Refactor some diagnostic code to use raw_string_ostream. No functionality change.
...
llvm-svn: 63177
2009-01-28 04:47:13 +00:00
Ted Kremenek
99ae4120d6
Remove '#if 0' code.
...
llvm-svn: 63176
2009-01-28 04:37:52 +00:00
Ted Kremenek
062115af59
Patch by Alexei Svitkine: Refactor Sema::ParseAST API to allow clients to pass as an argument a TranslationUnit object whose contents live beyond the call to ParseAST.
...
llvm-svn: 63175
2009-01-28 04:29:29 +00:00
Mike Stump
5d1ebe90b3
Add a preliminary version number.
...
llvm-svn: 63168
2009-01-28 02:43:35 +00:00
Daniel Dunbar
6ec8a4d9e3
ABITest: Support --test-layout option for generating
...
size/alignment/offsetof based tests of types instead of calling
convention tests.
llvm-svn: 63167
2009-01-28 02:01:23 +00:00
Fariborz Jahanian
3d3426f321
Set visibility of ivar offset symbols according to
...
accessibility of the ivar (related to objc2's
non-fragile abi).
llvm-svn: 63166
2009-01-28 01:36:42 +00:00
Fariborz Jahanian
40a4bcd49b
Generation of ivar-offset symbols in objc2's non-fragile abi.
...
Changed section names for meta-data (to match current gcc).
llvm-svn: 63163
2009-01-28 01:05:23 +00:00
Ted Kremenek
1502b7e288
On Windows use a BumpPtrAllocator for the UniqueFileContainer's StringMap.
...
llvm-svn: 63162
2009-01-28 01:01:07 +00:00
Nuno Lopes
b81d94ff58
add test for PR2502, which was already fixed some time ago
...
llvm-svn: 63160
2009-01-28 00:44:33 +00:00
Ted Kremenek
bb2f25b40f
FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and FileEntries.
...
Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m):
non-PTH: 0.4% improvement
PTH: 0.8% improvement
llvm-svn: 63159
2009-01-28 00:44:12 +00:00
Nuno Lopes
bb537dc189
fix PR3427: fix debuginfo for incomplete array types
...
llvm-svn: 63158
2009-01-28 00:35:17 +00:00
Ted Kremenek
5c04bd81ed
Add a some comments to designate Windows-specific/Unix-specific code. No functionality change.
...
llvm-svn: 63157
2009-01-28 00:27:31 +00:00
Steve Naroff
99c0cdf899
Finish making AST BumpPtrAllocation runtime configurable (based on -disable-free).
...
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m
0.179u 0.051s 0:00.23 95.6% 0+0k 0+0io 0pf+0w
snaroff% time ../../Release-Asserts/bin/clang INPUTS/Cocoa_h.m -disable-free
0.169u 0.052s 0:00.22 95.4% 0+0k 0+0io 0pf+0w
llvm-svn: 63153
2009-01-27 23:20:32 +00:00
Sebastian Redl
a5a77a6dc6
Add handling of member pointers to reinterpret_cast.
...
llvm-svn: 63150
2009-01-27 23:18:31 +00:00
Fariborz Jahanian
e19a1f15ae
After talking to our runtime guru, I added a comment.
...
llvm-svn: 63141
2009-01-27 22:27:56 +00:00
Ted Kremenek
3efd355b9d
Updated checker build.
...
llvm-svn: 63140
2009-01-27 22:24:33 +00:00
Steve Naroff
096bab711e
Convert types over to placement new() that takes an ASTContext.
...
Also changed FunctionTypeProto to be allocated with 8-byte alignment (noticed by Doug). I couldn't think of any reason to allocate on 16-byte boundaries. If anyone remembers why we were doing this, let me know!
llvm-svn: 63137
2009-01-27 22:08:43 +00:00
Steve Naroff
13ae6f47cd
Remove many references to ASTContext::getAllocator(), replacing them with calls to the recently added placement new (which uses ASTContext's allocator for memory). Also added ASTContext::Deallocate().
...
This will simplify runtime replacement of ASTContext's allocator. Keeping the allocator private (and removing getAllocator() entirely) is also goodness.
llvm-svn: 63135
2009-01-27 21:25:57 +00:00
Daniel Dunbar
f4a0cba545
ccc/Darwin/clang: Fix a mistranslation for the llvm-backend; llvm-gcc
...
doesn't set the relocation model when -mdynamic-no-pic is present.
llvm-svn: 63129
2009-01-27 20:42:58 +00:00
Anders Carlsson
570c357ded
If an input constraint refers to an output constraint, it should have the same constraint info as the output constraint. Fixes PR3417
...
llvm-svn: 63127
2009-01-27 20:38:24 +00:00