]>
granicus.if.org Git - clang/log
Fariborz Jahanian [Wed, 31 Oct 2007 23:08:24 +0000 (23:08 +0000)]
Fixed a bug exposed by fixing the assert in previous patch (one of the tests asserted).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 31 Oct 2007 22:57:04 +0000 (22:57 +0000)]
Changed direction of assert. Added more comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 22:44:07 +0000 (22:44 +0000)]
Implemented more of serialization/deserialization for ASTContext. We now
(hypothetically) read in/write out most of the types. Bugs likely exist.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 31 Oct 2007 22:11:35 +0000 (22:11 +0000)]
Fix two rewriter bugs:
- For @class, don't generate multiple typedefs.
- Handle the following edge case interface...
@interface NSMiddleSpecifier : NSObject {}
@end
...which was incorrectly being rewritten to...
struct _interface_NSMiddleSpecifier {
struct _interface_NSObject _NSObject;
};
{}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 31 Oct 2007 22:04:46 +0000 (22:04 +0000)]
Handle function calls that return aggregate expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 31 Oct 2007 21:59:43 +0000 (21:59 +0000)]
More infrastructure to recognize objective-c's type qualifiers (in,inout, etc.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43580
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 21:02:10 +0000 (21:02 +0000)]
New test to verify llvm struct layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 21:01:37 +0000 (21:01 +0000)]
Check whether next slot meets field type's alignment requirements.
If it does not then assert at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 31 Oct 2007 20:55:39 +0000 (20:55 +0000)]
Implement ObjC built-in types in MinimalAction.
This fixes the recent regression with selector-1.m and -parse-noop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 20:55:27 +0000 (20:55 +0000)]
Implemented short-circuited version of Builtin::Info::operator!=.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43574
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 20:08:22 +0000 (20:08 +0000)]
Keep track of field offsets during structure layout.
Take 2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 20:01:01 +0000 (20:01 +0000)]
Take 2.
Make target info available to clang code generator. This is far from complete but this helps clang codegen module make progress.
At the moment target triplet and target description strings are hard coded in clang::TargetInfo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 20:00:03 +0000 (20:00 +0000)]
Adjusted QualType deserialization to reflect updated deserialization API.
We now serialize ivar references inside of ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 19:54:57 +0000 (19:54 +0000)]
Initialize MemCpyFn
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 31 Oct 2007 18:48:14 +0000 (18:48 +0000)]
Fixed problem with rewriting stand-alone @implementation (with no matching @interface).
A new test case added.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 31 Oct 2007 18:42:27 +0000 (18:42 +0000)]
Implement a more sensible strategy for ObjC built-in types (addressing a long standing FIXME in Sema::GetObjcIdType()).
This removes several gross hacks to work around the previous "lazy" behavior.
Two notes:
- MinimalActions still needs to be taught about the built-in types (This breaks one of the -noop test cases). I started this, then added a FIXME.
- I didn't convert Sema::GetObjcProtoType() yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 18:41:19 +0000 (18:41 +0000)]
Preliminary support for serializing statements.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 17:58:51 +0000 (17:58 +0000)]
Updated path to clang.cpp in build documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 17:57:30 +0000 (17:57 +0000)]
Updated build instructions to not include an absolute line number in clang.cpp to add hard-coded paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 17:53:38 +0000 (17:53 +0000)]
Updated a comment to hopefully silence a Lattner warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 17:50:23 +0000 (17:50 +0000)]
Implemented serialization of Variable Array Types (VLAs).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 31 Oct 2007 17:29:28 +0000 (17:29 +0000)]
Rewriteing of ivars changed to just copy directly from the source.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 17:10:13 +0000 (17:10 +0000)]
Renamed ivar "ArrayTypes" in ASTContext to "ComplexArrayTypes".
Added skeleton code for serialization of ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 31 Oct 2007 16:03:04 +0000 (16:03 +0000)]
Checking in some code that is still under construction.
I need to (finally) change the way Class/id/SEL/IMP are built-in...the current approach of doing it in the preprocessor is "broken". The other problem is Sema::GetObjcIdType/GetObjcSelType/GetObjcClassType, the hooks that initialize ASTContext lazily. These built-in types need to be done up front...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 31 Oct 2007 16:00:13 +0000 (16:00 +0000)]
After Anders check-in, we can now encode 'Class' type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43556
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 31 Oct 2007 15:31:24 +0000 (15:31 +0000)]
Added a few clarifying steps the the "building clang" section.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 31 Oct 2007 04:53:03 +0000 (04:53 +0000)]
temporarily revert devang's patch to link in the llvm codegen etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 31 Oct 2007 04:38:33 +0000 (04:38 +0000)]
Add some plumbing to help cope with rewriting "id<p>", "Class<p>*".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 31 Oct 2007 02:53:19 +0000 (02:53 +0000)]
Encode Class, SEL and Objective-C objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 01:23:10 +0000 (01:23 +0000)]
Keep track of field offsets during structure layout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 31 Oct 2007 00:59:29 +0000 (00:59 +0000)]
Make target info available to clang code generator.
This is far from complete but this helps clang codegen module
make progress.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43536
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 31 Oct 2007 00:12:35 +0000 (00:12 +0000)]
Added new type and bitfield fields in some decl types in preparation for objective-c's type qualifiers.
Added initialization of Class/SEMA types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 30 Oct 2007 23:22:14 +0000 (23:22 +0000)]
Avoid unnecessary PATypeHolder copy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 30 Oct 2007 23:14:51 +0000 (23:14 +0000)]
Stop pre-defining objc_msgSend/objc_getClass in the preprocessor. Instead, I generate these declaration on the fly when rewriting a message expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Oct 2007 22:57:35 +0000 (22:57 +0000)]
Updated some comments.
Disabled assignments for ContentCache.
Copy-ctor for ContentCache now has an assertion preventing it to
be copied from an object that already has an allocated buffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43526
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Oct 2007 22:53:42 +0000 (22:53 +0000)]
__real__ and __imag__ can be lvalues. Add support to ast and codegen for them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Oct 2007 21:48:34 +0000 (21:48 +0000)]
Refactored CFG construction code that processes DeclStmts to use StmtIterator.
Now CFG construction transparently supports Variable Length Array declarations
with expressions for their sizes, and typedefs that include VLAs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 30 Oct 2007 21:27:20 +0000 (21:27 +0000)]
Refactor code into a separate method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Oct 2007 21:08:08 +0000 (21:08 +0000)]
Removed SrcMgr::FileInfo and SrcMgr::InfoRec and replaced them with a
single class: ContentCache. This simplifies the logic in
SourceManager and makes the ownership of MemoryBuffers clearer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Oct 2007 21:03:09 +0000 (21:03 +0000)]
Tightened IgnoreParen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 30 Oct 2007 20:59:40 +0000 (20:59 +0000)]
Fix 80 col violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43516
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Oct 2007 20:57:56 +0000 (20:57 +0000)]
minor tweaks
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43515
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 30 Oct 2007 20:46:47 +0000 (20:46 +0000)]
Use
+ llvm::DenseMap<Type *, llvm::PATypeHolder> TypeHolderMap;
instead of
- llvm::DenseMap<Type *, llvm::PATypeHolder *> TypeHolderMap;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43514
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 30 Oct 2007 20:41:57 +0000 (20:41 +0000)]
Fixed tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Oct 2007 20:27:44 +0000 (20:27 +0000)]
minor code cleanup
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Oct 2007 18:54:50 +0000 (18:54 +0000)]
shrinkify storage class to a bitfield, add a fixme about merging it in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 30 Oct 2007 18:31:12 +0000 (18:31 +0000)]
Remove commented out line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 30 Oct 2007 18:27:03 +0000 (18:27 +0000)]
Revisited my last patch to be able to do encoding of ivar types with 'id'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Oct 2007 17:46:51 +0000 (17:46 +0000)]
update some comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 30 Oct 2007 17:45:43 +0000 (17:45 +0000)]
Avoid using macro expansions, which causes these to come out in -E mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 30 Oct 2007 17:06:23 +0000 (17:06 +0000)]
Added type encoding for 'id' type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43504
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 30 Oct 2007 16:42:30 +0000 (16:42 +0000)]
Rewrite protocols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 30 Oct 2007 16:41:53 +0000 (16:41 +0000)]
Added vector to ASTContext to store references to "complete" VLA types
(VLAs with a specified size expresssion). This vector owns the
references to these type objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 30 Oct 2007 13:30:57 +0000 (13:30 +0000)]
- Add location info to category/protocol AST's
- Rewrite categories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 30 Oct 2007 03:43:13 +0000 (03:43 +0000)]
Remove a couple FIXME's for rewriting ObjC interfaces (which are now being rewritten properly).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 30 Oct 2007 02:23:23 +0000 (02:23 +0000)]
More support for rewriting ObjC intefaces. Still some edge cases to handle...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 30 Oct 2007 00:06:20 +0000 (00:06 +0000)]
Handle function types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 30 Oct 2007 00:00:49 +0000 (00:00 +0000)]
Assert if isObjcIdType is called before 'id' type is built.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 23:37:31 +0000 (23:37 +0000)]
VariableArrayTypes (VLAs) without a size expression are now uniqued
and inserted into a FoldingSet owned by ASTContext.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 29 Oct 2007 22:57:28 +0000 (22:57 +0000)]
Encoding for objectiive-c methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Mon, 29 Oct 2007 21:54:46 +0000 (21:54 +0000)]
Updated VC++ build system
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hartmut Kaiser [Mon, 29 Oct 2007 21:54:12 +0000 (21:54 +0000)]
Added a missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 29 Oct 2007 21:39:29 +0000 (21:39 +0000)]
Remove a bunch of TODO's that have been done for quite some time...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 29 Oct 2007 21:38:07 +0000 (21:38 +0000)]
This commit contains lot's of small tweaks to how we pass around and store SourceLocation's for interfaces/protocols/categories/implementations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43475
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 21:38:03 +0000 (21:38 +0000)]
Added support for StmtIterators to iterate over the size expressions
of VariableArrayTypes that appear in TypedefDecls.
for example:
typedef int T[x][x];
the StmtIterator will iterate over "x" and "x" as subexpressions of
the DeclStmt for T.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43474
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 21:23:58 +0000 (21:23 +0000)]
Fixed deadcode bug where check for NULL decl occured within a block
where the decl would always be non-NULL. Moved the check to after the
block to properly tidy up the iterator's state.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 29 Oct 2007 20:50:19 +0000 (20:50 +0000)]
Add RecordOrganizer::layoutUnionFields()
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 20:50:16 +0000 (20:50 +0000)]
Modified StmtIterator to support iteration over the size expressions
of VariableTypeArray types that appear in DeclStmts.
Removed operator-- from StmtIterator. operator-- added undesired
complexity, and we have no consumers of it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 20:41:04 +0000 (20:41 +0000)]
Modified CFG pretty-printing to directly use the (reverse) body
iterator of a CompountStmt instead of relying on StmtIterators.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 18:04:38 +0000 (18:04 +0000)]
Renamed internal variables of StmtIteratorBase to make the code
slightly more succinct.
Introduced VariableArrayType* within StmtIteratorBase to (soon)
support iteration over the size expressions of variable length arrays.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 29 Oct 2007 17:16:25 +0000 (17:16 +0000)]
Do the encoding of ivar types in the ivar metadata.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43454
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 17:13:39 +0000 (17:13 +0000)]
Added some comments.
Moved a dependent predicate in an if statement to be an assertion
within the if statement body.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43453
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 17:02:56 +0000 (17:02 +0000)]
Added to test case for "self-comparison check" uses of relation operators: x < x and x > x
should emit warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 16:58:49 +0000 (16:58 +0000)]
For non-floating point types, added check for expressions of the form
"x == x" and "x != x". We emit a warning for these since they always evaluate
to a constant value and often indicate a logical error.
Added test case for this check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43450
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 29 Oct 2007 16:56:27 +0000 (16:56 +0000)]
Insetead of assert() just emit an error message for
an unimplemented work and continue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 16:45:23 +0000 (16:45 +0000)]
For floating point equality check, we now ignore parentheses. e.g.:
(x) == x is the treated the same as x == x.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 29 Oct 2007 16:40:01 +0000 (16:40 +0000)]
For checking for floating point comparison using == or !=, we now suppress
errors for cases such as "x == x".
Added test case to test this feature.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Oct 2007 06:33:42 +0000 (06:33 +0000)]
Address Chris's comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Oct 2007 05:58:43 +0000 (05:58 +0000)]
Fix logic error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43443
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 05:15:40 +0000 (05:15 +0000)]
when checking for type equality, ignore typedefs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 05:08:52 +0000 (05:08 +0000)]
improve error recovery handling broken 'then' or 'else' stmts in
if statements. This implements Sema/if-empty-body.c:f3, silencing
a bogus secondary warning. It also improve the location info for
the nullstmts created for recovery purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Oct 2007 05:01:08 +0000 (05:01 +0000)]
Add (partial) support for @encode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 04:42:53 +0000 (04:42 +0000)]
The callers of ParseStructDeclaration are not expecting it to
eat the terminating ;. Fix one place where it did, allowing this
to compile without error:
struct x {
int a;
union {
int b;
float c;
};
int d;
};
This reduces diagnostics on PR1750 from 33 to 27.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 04:26:44 +0000 (04:26 +0000)]
casting to void is ok for structs (C99 6.5.4p2), this fixes
one bogus error on PR1750.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 04:18:06 +0000 (04:18 +0000)]
Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on
PR1750
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 04:06:22 +0000 (04:06 +0000)]
Fix a parser bug on labeled inline asm stmts, allowing us
to parse stuff like:
asm volatile("1: rex64/fxrstor (%[fx])\n\t"
"2:\n"
".section .fixup,\"ax\"\n"
"3: movl $-1,%[err]\n"
" jmp 2b\n"
".previous\n"
".section __ex_table,\"a\"\n"
" .align 8\n"
" .quad 1b,3b\n"
".previous"
: [err] "=r" (err)
: [fx] "cdaSDb" (fx), "m" (*fx), "0" (0));
This reduces # diagnostics on PR1750 from 49 to 37.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43434
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 04:04:16 +0000 (04:04 +0000)]
Implement *skeletal* support for representing GNU inline asm stmts in the AST,
resolving a crash on a .i file in PR1750. We now generate 49 errors on the
.i file in that bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 29 Oct 2007 03:41:11 +0000 (03:41 +0000)]
Fix a major bug in the Type::getAs*Type methods: they didn't strip off
typeof(type) and typeof(expr) correctly. Now provide a single point of
contact (Type::getDesugaredType) for doing the shallow stripping we need.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43432
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Oct 2007 02:59:40 +0000 (02:59 +0000)]
Generate code for __builtin_classify_type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 29 Oct 2007 02:52:18 +0000 (02:52 +0000)]
Add BuiltinType::Char_S to Type::isCharType
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 28 Oct 2007 21:21:04 +0000 (21:21 +0000)]
Implemented serialization for TypedefType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 28 Oct 2007 00:59:26 +0000 (00:59 +0000)]
Implemented serialization of FunctionTypeProto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43419
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Oct 2007 19:58:08 +0000 (19:58 +0000)]
Implemented serialization of FunctionTypeNoProto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Oct 2007 19:05:09 +0000 (19:05 +0000)]
Implemented serialization for VectorType.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43417
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Oct 2007 23:52:52 +0000 (23:52 +0000)]
More work on type serialization: added support for serializing BuiltinTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43414
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Oct 2007 23:09:28 +0000 (23:09 +0000)]
Path to synthesize 'instance' size field of _objc_class metadata.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Oct 2007 22:00:08 +0000 (22:00 +0000)]
Completed serialization of ConstantArrayTypes (now that APInt serialization is in place).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 26 Oct 2007 20:53:56 +0000 (20:53 +0000)]
Start rewriting ObjC interfaces. As a start, we comment out all the methods. This involved refining how the parser/AST passes/manages SourceLocations for ObjcMethodDecl's.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Oct 2007 20:50:24 +0000 (20:50 +0000)]
This patch allows synthesis generation of ivar offset for legacy objective-c @implementation
decl without an @interface decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Oct 2007 20:24:35 +0000 (20:24 +0000)]
Added skeleton implementation of serialization for types (not complete).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43397
91177308 -0d34-0410-b5e6-
96231b3b80d8