Anders Carlsson [Tue, 27 Nov 2007 07:22:09 +0000 (07:22 +0000)]
Add builtin type signature support for vector types. Add correct type signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h
Ted Kremenek [Mon, 26 Nov 2007 23:12:30 +0000 (23:12 +0000)]
Added optional pass-by-reference argument "isExact" to
NumericLiteralParser::GetFloatValue(). Upon method return, this flag has the value
true if the returned APFloat can exactly represent the number in the parsed text,
and false otherwise.
Modified the implementation of GetFloatValue() to parse literals using APFloat's
convertFromString method (which allows us to set the value of isExact).
Kevin [Mon, 26 Nov 2007 20:47:14 +0000 (20:47 +0000)]
Removes link to status page till the info gets added. Someone put us on Reddit; Don't want it to look bad on the project. :)
http://programming.reddit.com/info/61f8g/comments/
Ted Kremenek [Mon, 26 Nov 2007 18:20:26 +0000 (18:20 +0000)]
Fixed bug in CFG construction where we did not properly handle the GCC
extension "?:" for the ternary operator, e.g.: x ?: y; This expression is
represented in the clang ASTs as a ConditionalOperator whose LHS expression is
NULL. Now we handle this special case, causing the block containing the
condition to be a predecessor to the block that "merges" the values of the
ternary operator.
Thanks to Nuno Lopes for identifying and diagnosing this bug!
Bill Wendling [Mon, 26 Nov 2007 08:26:20 +0000 (08:26 +0000)]
The checking for the delimiters of expected error/warning messages was
looking only for { and } instead of {{ and }}. Changed it to check for
this explicitly.
Chris Lattner [Mon, 26 Nov 2007 01:40:58 +0000 (01:40 +0000)]
Fix sema support for the gnu ?: expression with a
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right
result type. This fixes PR1824.
Ted Kremenek [Sat, 24 Nov 2007 20:07:36 +0000 (20:07 +0000)]
Fixed bogus culling of uninitialized-values "taint" propagation during assignments.
We accidentally were throttling the propagation of uninitialized state across
assignments (e.g. x = y). Thanks to Anders Carlsson for spotting this problem.
Added test cases to test suite to provide regression testing for the
uninitialized values analysis.
Ted Kremenek [Tue, 20 Nov 2007 03:03:00 +0000 (03:03 +0000)]
Added another test case for the Dead Stores checker that tests that
block-level expressions are evaluated the same as regular expressions. Test
case provided by Nuno Lopes.
Ted Kremenek [Tue, 20 Nov 2007 03:01:58 +0000 (03:01 +0000)]
Updated CFGStmtVisitor and CFGRecStmtVisitor to have a notion of
"block-expressions" when visiting arbitrary expressions (via calls to
"Visit()"). This results in a refactoring where a dataflow analysis no
longer needs to always special case when handling block-expressions versus
non-block expressions.
Updated LiveVariables and UninitializedValues to conform to the slightly
altered interface of these visitor classes.
Thanks to Nuno Lopes for providing a test case that illustrated some
fundamental problems in the current design of the CFGXXXStmtVisitor classes
and how they were used.
Ted Kremenek [Mon, 19 Nov 2007 06:38:23 +0000 (06:38 +0000)]
Added test case for dead stores checker (live variables analysis) that tests
for correct propagation/update of liveness information within subexpressions
of Block-Level expressions. Test case provided by Nuno Lopes.
Ted Kremenek [Mon, 19 Nov 2007 06:36:49 +0000 (06:36 +0000)]
Fixed bug where LiveVariables was not properly propagating updates to liveness
state that occurred in subexpressions of Block-Level expressions. Bug and fix
provided by Nuno Lopes.
Ted Kremenek [Sun, 18 Nov 2007 20:06:01 +0000 (20:06 +0000)]
Fixed bug in WalkaST_VisitDeclSubExprs where we failed to properly check if
the StmtIterator referring to the initializers of a chain of Decls was equal
to the "end" iterator. The particular bug manifested when an iterator was
created on a chain of decls with no initializers.
Thanks to Nuno Lopes for reporting this bug and providing a patch.
Ted Kremenek [Fri, 16 Nov 2007 19:00:35 +0000 (19:00 +0000)]
Added assertion in serialization of DeclRefExprs. DeclRefExprs can only
own the decl they reference if it is a FunctionDecl. Note that his
ownership property is still considered a hack, and should be fixed.
Ted Kremenek [Fri, 16 Nov 2007 18:11:10 +0000 (18:11 +0000)]
Fixed bug in the serialization of FunctionDecls. We would incorrectly
query for the number of parameters for FunctionDecls that had type
FunctionTypeNoProto.
Ted Kremenek [Thu, 15 Nov 2007 18:26:39 +0000 (18:26 +0000)]
Added hack when serializing DeclRefExprs. This should probably be fixed.
Some FunctionDecls do not appear at the top-level or are owned by a DeclStmt.
In calls to implicitly defined functions, a FunctionDecl is created, but only
the DeclRefExprs reference them. Since an implicitly defined function may be
called multiple times, there is no clear ownership model for such objects.
Temporary solution: when serializing out DeclRefExprs, emit an ownership bit
for the Decl. This bit is determined by querying the serializer to see if the
Decl has already been serialized. If it hasn't, emit the Decl as an owned
pointer.
Steve Naroff [Thu, 15 Nov 2007 02:58:25 +0000 (02:58 +0000)]
- Implement ivar rewrite (patch by Fariborz).
- RewriteMessageExpr()...make implicit casts explicit with synthesizing call (removing warnings when calling objc_msgSend()).
Steve Naroff [Wed, 14 Nov 2007 23:54:14 +0000 (23:54 +0000)]
Cast implicit "self" argument to "id". This removes all warnings associated with implicit references to self. It doesn't yet deal withexplicit references to self...
Ted Kremenek [Wed, 14 Nov 2007 23:38:09 +0000 (23:38 +0000)]
Fixed bug in serialization of EnumConstantDecl where we improperly
"default constructed" an APSInt. Fixed another bug in the same method
where we did not allow the NextDeclarator to be NULL.
Steve Naroff [Wed, 14 Nov 2007 23:02:56 +0000 (23:02 +0000)]
Always generate a typedef for @class. The typedef removal logic that I'm removing only made sense when we were operating on preprocess files without typedef guards. Now that we have guards, it is incorrect to ever remove one (since it may increase the likelihood that the rewritten header can't be included stand alone).
Ted Kremenek [Wed, 14 Nov 2007 22:51:02 +0000 (22:51 +0000)]
Added QualType::ReadBackpatch to allow QualType initialization with
backpatching. This original was available, but then we removed it. It is back
again to help with deserialization of FieldDecls. Because FieldDecls are
currently owned by RecordDecls, which are owned by a TagType, the type of the
FieldDecl may not be deserialized prior to deserializing the FieldDecl. Thus
backpatching solves the problem of constructing a FieldDecl that references a
type that has not yet been deserialized.
Simplified serialization of TagType to not require passing in the
SerializedPtrID. Registration of the materialized type object is done after
the CreateImpl method returns (as with other types).
Ted Kremenek [Wed, 14 Nov 2007 17:46:35 +0000 (17:46 +0000)]
SourceManager, IdentifierTable, Selectors are now serialized in their own
block separate from ASTContext. This block is serialized out AFTER writing out
ASTContext, but deserialized BEFORE reading in ASTContext. This permits the
optimization of the serialization of the IdentifierTable where we only write
out identifiers that are used.
This was needed because TagDecls are owned by Types, and TagDecls contain
identifiers. Thus types need to be written out first to register with the
serializer any identifiers they refer to (and hence need to be serialized out
with IdentifierTable).
Ted Kremenek [Wed, 14 Nov 2007 08:06:37 +0000 (08:06 +0000)]
Implemented serialization of RecordDecls. Changed serialization of TagType to
have an owning pointer to the referred TagDecl. This should hopefully fix a
bug where TagDecls (including decls from structs, etc.) were not serialized.
Ted Kremenek [Wed, 14 Nov 2007 00:03:20 +0000 (00:03 +0000)]
Modified ASTContext::getTagDeclType() to accept a NULL pointer for the passed
in TagDecl*. This allows the deserializer to use ASTContext to create the
TagTypes. Deserialize TagTypes then rely on pointer-backpatching to resolve
the decls.
This may not be the interface that we want, but as the implementation of
TagTypes will potentially change significantly in the future, I'm leaving this
for now. An appropriate FIXME is in place.