Douglas Gregor
17bd094a6b
Improvements to code-generation and semantic analysis of designated
...
initializers.
- We now initialize unions properly when a member other than the
first is named by a designated initializer.
- We now provide proper semantic analysis and code generation for
GNU array-range designators *except* that side effects will occur
more than once. We warn about this.
llvm-svn: 63253
2009-01-28 23:36:17 +00:00
Fariborz Jahanian
d27a820ae2
Add setter/getter methods to the list of methods
...
of class's meta-data (related to objc2 nonfragile abi).
llvm-svn: 63251
2009-01-28 22:46:49 +00:00
Ted Kremenek
b4dd3f8685
Remove '#if 0' code.
...
llvm-svn: 63250
2009-01-28 22:35:55 +00:00
Ted Kremenek
2e561dd491
Remove method 'AddNE' from the public interface of ConstraintManager.
...
llvm-svn: 63249
2009-01-28 22:27:59 +00:00
Daniel Dunbar
f50e60b23a
Implement basic _Complex integer constant folding.
...
- Merged into single ComplexEvaluator, these share too much logic to
be worth splitting for float/int (IMHO). Will split on request.
llvm-svn: 63248
2009-01-28 22:24:07 +00:00
Fariborz Jahanian
066347ec7b
property metadata for objc2's nonfragile abi
...
llvm-svn: 63246
2009-01-28 22:18:42 +00:00
Ted Kremenek
5997644550
Add some comments to GRStateManager. No functionality change.
...
llvm-svn: 63243
2009-01-28 22:11:38 +00:00
Douglas Gregor
347f7eabb9
Code generation support for C99 designated initializers.
...
The approach I've taken in this patch is relatively straightforward,
although the code itself is non-trivial. Essentially, as we process
an initializer list we build up a fully-explicit representation of the
initializer list, where each of the subobject initializations occurs
in order. Designators serve to "fill in" subobject initializations in
a non-linear way. The fully-explicit representation makes initializer
lists (both with and without designators) easy to grok for codegen and
later semantic analyses. We keep the syntactic form of the initializer
list linked into the AST for those clients interested in exactly what
the user wrote.
Known limitations:
- Designating a member of a union that isn't the first member may
result in bogus initialization (we warn about this)
- GNU array-range designators are not supported (we warn about this)
llvm-svn: 63242
2009-01-28 21:54:33 +00:00
Ted Kremenek
c783209605
retain/release checker: Always generate an "autorelease" summary for an "autorelease" message, and have the summary processing logic treat it as a no-op in GC mode. This change is motivated to encode more of the semantics in the summaries themselves for eventual better diagnostics.
...
llvm-svn: 63241
2009-01-28 21:44:40 +00:00
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