]>
granicus.if.org Git - clang/log
Lauro Ramos Venancio [Tue, 22 Jan 2008 22:36:45 +0000 (22:36 +0000)]
Implement bitfield write.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Tue, 22 Jan 2008 20:17:04 +0000 (20:17 +0000)]
Implement bitfield read.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46257
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Jan 2008 19:34:51 +0000 (19:34 +0000)]
Fix PR1936, a crash on malformed #if. Thanks to Neil for
noticing this!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Tue, 22 Jan 2008 19:15:30 +0000 (19:15 +0000)]
Fix two bugs in bitfield codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46255
91177308 -0d34-0410-b5e6-
96231b3b80d8
Gordon Henriksen [Tue, 22 Jan 2008 18:46:25 +0000 (18:46 +0000)]
Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46253
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 22 Jan 2008 17:14:30 +0000 (17:14 +0000)]
clarify wording.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 22 Jan 2008 00:55:40 +0000 (00:55 +0000)]
- Add Sema::CheckStringLiteralInit, Sema::IsStringLiteralInit.
- Use previous hooks to simplify Sema::CheckInitializerTypes()...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46235
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 21 Jan 2008 23:53:58 +0000 (23:53 +0000)]
Sema::CheckInitializerTypes(). Start simpliying and cleaning up...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46234
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Mon, 21 Jan 2008 23:08:35 +0000 (23:08 +0000)]
Add Ubuntu 7.10 include path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46233
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Jan 2008 22:59:53 +0000 (22:59 +0000)]
Elimate bogus warning when va_start is correctly used in
a method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46232
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 21 Jan 2008 22:59:18 +0000 (22:59 +0000)]
Add a predicate/getter when checking for incomplete array types ("[]").
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46231
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Mon, 21 Jan 2008 22:54:57 +0000 (22:54 +0000)]
Simplify the bitfield codegen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46230
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 21 Jan 2008 20:14:23 +0000 (20:14 +0000)]
Synthesize methods with va-arg list correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46212
91177308 -0d34-0410-b5e6-
96231b3b80d8
Lauro Ramos Venancio [Sun, 20 Jan 2008 04:02:16 +0000 (04:02 +0000)]
Fix the __SIZE_TYPE__ definition on x86_32. This fixes the alloca.c (wget 1.10.2) compilation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46196
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 19 Jan 2008 01:03:17 +0000 (01:03 +0000)]
Fixed comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46185
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sat, 19 Jan 2008 00:42:38 +0000 (00:42 +0000)]
Fix two bugs with an @throw that doesn't have a statement.
- ObjCAtThrowStmt::getSourceRange() needs to check if it has a statement (and not go "boom":-)
- RewriteTest::RewriteObjCThrowStmt() needs to generate refer to the current exception.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 19 Jan 2008 00:30:35 +0000 (00:30 +0000)]
Patch to replace #import with #include.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 18 Jan 2008 23:34:17 +0000 (23:34 +0000)]
Add Basic/Targets.cpp to the Xcode project...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46182
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 18 Jan 2008 20:40:52 +0000 (20:40 +0000)]
Sema::FinalizeDeclaratorGroup(): Tighten up the tentative definition rule when dealing with arrays.
Bug submitted by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 18 Jan 2008 02:25:57 +0000 (02:25 +0000)]
Assert that the type of the cast is equal to the _unqualified_ type of the subexpression. Fixes a problem spotted by Nuno Lopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 18 Jan 2008 01:15:54 +0000 (01:15 +0000)]
Insert #pragma once when rewriting a header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jan 2008 00:41:32 +0000 (00:41 +0000)]
Fixed bug in 'GetBinding' when doing the lookup of stored values. We now
use ImmutableMap::SlimFind(), which returns the correct value.
Added pruning of dead block-level expressions and Decls from our value map
using liveness information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jan 2008 00:40:21 +0000 (00:40 +0000)]
Fixed bug in 'LiveVariables' analysis where we incorrectly marked a variable
dead at an assignment without taking into account if the variable was used in
the RHS of the assignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Fri, 18 Jan 2008 00:39:39 +0000 (00:39 +0000)]
Sema::FinalizeDeclaratorGroup()...make sure we emit an diagnostic for tentative definitions with incomplete types. Touch up all test cases that are effected.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 18 Jan 2008 00:38:55 +0000 (00:38 +0000)]
Changed DataflowSolver to always associated recorded dataflow values with
the position *before* a statement, regardless of whether we are doing a
forward or backwards analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46151
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jan 2008 20:48:37 +0000 (20:48 +0000)]
Modified the notion of "Block-level expressions" in CFGs to include Stmt*. This
is because GNU-style Statement-expressions cause the last statement in the
statement-expression to act like an expression.
We now have two notions: block-level statements and block-level expressions.
The former are all Stmt* that appear in the list of statements in CFGBlocks. The
latter is the subset of the former; these block-level statements are used as
subexpressions somewhere in the AST. CFG::isBlockExpr() returns true for the
latter, not the former (previously isBlockExpr() always returned true for
non-Expr Stmt*).
Modified the LiveVariables analysis to also track liveness state for block-level
expressions (using the updated definition of block-level expressions).
Modified the dataflow solver so that when it records values for block-level
statements, it records the dataflow value *before* the transfer function for a
Stmt* is evaluated (not after). This is more in sync in what clients will want.
Modified CFGStmtVisitor to record the current block-level statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46143
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 17 Jan 2008 20:33:24 +0000 (20:33 +0000)]
Don't ICE on missing interface declaration when declaring one of its protocols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 17 Jan 2008 19:24:05 +0000 (19:24 +0000)]
Improve diagnostic wording...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jan 2008 18:25:22 +0000 (18:25 +0000)]
Added support to dataflow solver to (when requested) also record dataflow
values for the block-level expressions.
Modified 'LiveVariables' to provide the option to clients to record
liveness information for block-level expressions (using the above feature).
Modified 'DeadStores' to conform to the new interface of 'LiveVariables'.
Modified 'GRConstants' to compute liveness information for block-level
expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 17 Jan 2008 18:06:09 +0000 (18:06 +0000)]
Match change in EmitCallExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 17 Jan 2008 18:03:22 +0000 (18:03 +0000)]
Fix for EmitCallExpr changed in OverloadExpr patch
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jan 2008 17:55:13 +0000 (17:55 +0000)]
Fixed typo introduced by r46133 that caused -Wfloat-equal to break.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jan 2008 17:50:49 +0000 (17:50 +0000)]
Removed FindDeclRef, and used Expr::IgnoreParens instead (code refactoring).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nate Begeman [Thu, 17 Jan 2008 17:46:27 +0000 (17:46 +0000)]
Implement basic overload support via a new builtin, __builtin_overload.
__builtin_overload takes 2 or more arguments:
0) a non-zero constant-expr for the number of arguments the overloaded
functions will take
1) the arguments to pass to the matching overloaded function
2) a list of functions to match.
The return type of __builtin_overload is inferred from the function whose args
match the types of the arguments passed to the builtin. For example:
float a;
float sinf(float);
int sini(int);
float b = __builtin_overload(1, a, sini, sinf);
Says that we are overloading functions that take one argument, and trying to
pass an argument of the same type as 'a'. sini() does not match since it takes
and argument of type int. sinf does match, so at codegen time this will turn
into float b = sinf(a);
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 17 Jan 2008 17:37:26 +0000 (17:37 +0000)]
Renamed getSynthesizedSelectorSize to getSynthesizedMethodSize. Compute method name
size in accordance with how rewriter synthesizes method name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jan 2008 16:57:34 +0000 (16:57 +0000)]
Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.
Refactored the use of this method into both the Sema module and Analysis module,
which were using their own static functions that did the same thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46129
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 17 Jan 2008 01:36:09 +0000 (01:36 +0000)]
Computed length of a __func__ identifier used in an objective-c method correctly,
when creating its type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46109
91177308 -0d34-0410-b5e6-
96231b3b80d8
Seo Sanghyeon [Thu, 17 Jan 2008 01:08:43 +0000 (01:08 +0000)]
Ignore --param
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46107
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 17 Jan 2008 00:52:48 +0000 (00:52 +0000)]
Added some experimental optimizations to remove dead values from the
state.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Thu, 17 Jan 2008 00:36:28 +0000 (00:36 +0000)]
Declarator::clear(): Null out variable after it's been deleted.
This avoids a double free (which is good:-)
Bug submitted by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46105
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jan 2008 23:56:32 +0000 (23:56 +0000)]
Simplify comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46103
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jan 2008 23:54:22 +0000 (23:54 +0000)]
Type::isArithmeticType(): disallow incomplete enum decls.
Bug submitted by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46102
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 23:35:31 +0000 (23:35 +0000)]
Changed sorting criteria for DSPtr to put sub-expressions first in the value
map. This will allow us to quickly prune them from maps without searching the
entire map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 23:33:44 +0000 (23:33 +0000)]
Changed sorting criteria for DSPtr to sort Decl* before Expr*, and
to sort sub-expressions before Block-level expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 22:28:08 +0000 (22:28 +0000)]
IntegerLiterals are no longer evaluated to create separate nodes; their
values are determined when evaluating the parent expression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46096
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 22:20:36 +0000 (22:20 +0000)]
Fixed bug where we performed addition instead of subtraction during
constant propagation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46095
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 22:13:19 +0000 (22:13 +0000)]
Fixed iterator bug in ExplodedNodeImpl::NodeGroup::end(); we would improperly
handle the case where the number of nodes was 0.
Fixed bug in GREngineImpl where we did not proceed to the next statement
when processing a PostStmt location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 21:46:15 +0000 (21:46 +0000)]
Added initial graph visualization support for the GRConstants analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 21:45:54 +0000 (21:45 +0000)]
Fixed invalid typedefs in the root and eop iterators for ExplodedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 19:47:19 +0000 (19:47 +0000)]
Added support from retrieving stored values to variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46087
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 19:42:59 +0000 (19:42 +0000)]
Added support for assignments in GRConstants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 19:28:16 +0000 (19:28 +0000)]
Fixed bug where GRConstants::AddBindings() did not check for values
that were "not a constant."
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46085
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 19:27:42 +0000 (19:27 +0000)]
Fixed bug in cleanup of nodes in ExplodedNodeImpl where we should directly
call the dstor instead of using delete.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Jan 2008 19:17:22 +0000 (19:17 +0000)]
Move promoteExprToType from being a static method in SemaExpr.cpp to being
a method named ImpCastExprToType in Sema.
Use this method to insert implicit casts for case statements from their
operand type to the condition type of the switch. This fixes a crash on
test/CodeGen/statements.c, reported by Eli Friedman.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 16 Jan 2008 19:16:00 +0000 (19:16 +0000)]
add accessors to switchstmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46082
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 19:11:06 +0000 (19:11 +0000)]
Fixed broken bitmasking in the ctor of ProgramPoint.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46081
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 18:59:52 +0000 (18:59 +0000)]
Added missing call to the checker's Initialize() method in the alternate
ctor for GREngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46080
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 18:59:09 +0000 (18:59 +0000)]
Added missing ctor to ExplodedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46079
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 18:58:48 +0000 (18:58 +0000)]
Fixed incorrect pointer mask.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46078
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 18:21:49 +0000 (18:21 +0000)]
Shortened driver option for running the GR-constants analysis to --grconstants.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46076
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 18:19:20 +0000 (18:19 +0000)]
Add missing header file for GRConstants analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 18:18:48 +0000 (18:18 +0000)]
Hooked up the GRConstants analysis to the driver.
Fixed some compilation errors with GREngine that showed up during
template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 17:56:25 +0000 (17:56 +0000)]
More cleanups in DoStmt. The NodeSets are now vectors instead of sets, since
node caching in GREngine will guarantee that we do not insert a node twice into
a nodeset.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 16 Jan 2008 15:01:34 +0000 (15:01 +0000)]
Sema::MergeFunctionDecl()...make sure diagnostic is accurate (wrt function declarations/definitions). Patch by Carl Lewis!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 05:51:13 +0000 (05:51 +0000)]
Adjusted DSPtr::Profile method again, since my last patch broke the build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 05:49:09 +0000 (05:49 +0000)]
Changed 'Profile' method for DSPtr to incorporate the flags from the
variant type, and not just the pointer value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46049
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 16 Jan 2008 00:53:15 +0000 (00:53 +0000)]
Renamed some internal classes for the GR-Constant Propagation analysis.
Cleaned up GRConstants::AddBinding to not directly reference the
predecessor node. Now we just manipulate the current state, and a driver
function creates nodes as needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46040
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 16 Jan 2008 00:09:11 +0000 (00:09 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46038
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 15 Jan 2008 23:58:23 +0000 (23:58 +0000)]
Added support for rewriting of continue/break statements inside ObjC2's foreach-stmt.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46037
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jan 2008 23:55:06 +0000 (23:55 +0000)]
Added skeleton implementation of new constant-prop. analysis using
the graph reachability engine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jan 2008 23:54:22 +0000 (23:54 +0000)]
Added ctor to GRNodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 15 Jan 2008 22:21:49 +0000 (22:21 +0000)]
Finish up handling all permutations of "complex int" (in Sema::UsualArithmeticConversions()).
A FIXME remains to verify the conversion rules are consistent with GCC.
Thanks to Eli for the new/improved test case...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46022
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 15 Jan 2008 19:36:10 +0000 (19:36 +0000)]
- Change Type::isComplexType() to exlude GCC's complex integer extension. In general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec).
- Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType().
This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46005
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jan 2008 05:22:14 +0000 (05:22 +0000)]
avoid pasting L + "foo" into L"foo".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46000
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 15 Jan 2008 05:14:19 +0000 (05:14 +0000)]
avoid token pasting between identifiers and wide strings:
abc+L"foo" -> abc L"foo", not abcL"foo"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45999
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 15 Jan 2008 02:05:07 +0000 (02:05 +0000)]
Add a comment...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45993
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 15 Jan 2008 01:41:59 +0000 (01:41 +0000)]
Rework commit r45976, which was incorrect.
- Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType().
- Don't inlude complex types with Type::isIntegerType(), which is too general.
- Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45992
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jan 2008 00:24:08 +0000 (00:24 +0000)]
Removed implicit transitions to a "BlockExit" location; we now handle
the end of the block by processing empty blocks (at BlockEntrance) or
when we have just processed the last statement in a block (at PostStmt).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45991
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 15 Jan 2008 00:18:01 +0000 (00:18 +0000)]
Removed mutation of CFGBlock through operator[]. For now the underlying ASTs,
however, can still be manipulated through the returned Stmt*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45990
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Jan 2008 23:33:18 +0000 (23:33 +0000)]
Make sure Sema::GetTypeForDeclarator() deals with abstract declarators when diagnosing incorrect code.
Bug submitted by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45989
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 23:24:37 +0000 (23:24 +0000)]
Added prototype implementation of path-sens. analysis core engine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45986
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 23:18:55 +0000 (23:18 +0000)]
Added operator[] for CFGBlock. This provides random access to the statements
of a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45984
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jan 2008 21:47:29 +0000 (21:47 +0000)]
Fix build issue on cygwin, patch by Sam Bishop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45977
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Jan 2008 21:38:57 +0000 (21:38 +0000)]
Teach Type::isIntegerType() about GCC's __complex__ integer extensions...
Bug submitted by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45976
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Jan 2008 20:51:29 +0000 (20:51 +0000)]
Fix crasher when redefining functions. Not 100% pleased with this solution, but it is clearly an improvement. Will discuss with Chris later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45975
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 18:42:38 +0000 (18:42 +0000)]
Cleaned up comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45970
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 18:41:42 +0000 (18:41 +0000)]
Cleaned up comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45969
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 18:29:39 +0000 (18:29 +0000)]
When serializing CompoundLiteralExpr, serialize out the file scope flag before
serializing the subexpression (Init), as this results in a more efficient
encoding in the bitstream.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45967
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Jan 2008 18:19:28 +0000 (18:19 +0000)]
Record if a compound literal expression is @ file scope. This allows us to implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable.
Bug/patch by Eli Friedman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45966
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 18:11:35 +0000 (18:11 +0000)]
Removed 'inline' keywords from methods now defined in ExplodedGraph.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45965
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 14 Jan 2008 16:44:48 +0000 (16:44 +0000)]
Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and remove
#include<iostream>.
Patch provided by Sam Bishop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45962
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Jan 2008 16:10:57 +0000 (16:10 +0000)]
Revert r45951, Chris says it violates the C99 spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45961
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 14 Jan 2008 07:46:40 +0000 (07:46 +0000)]
_asm is another valid alias for asm.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45957
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Mon, 14 Jan 2008 06:28:57 +0000 (06:28 +0000)]
Add codegen upport for implicit casts to aggregate exprs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45954
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jan 2008 06:27:57 +0000 (06:27 +0000)]
add a note
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45953
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Jan 2008 05:45:46 +0000 (05:45 +0000)]
Fix ASTContext::typesAreCompatible when analyzing a function type with
proto and function type without proto. It would never call
'functionTypesAreCompatible' because they have different type classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45952
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Mon, 14 Jan 2008 02:53:34 +0000 (02:53 +0000)]
Rewrite Expr::isNullPointerConstant() to deal with multiple levels of explicit casts.
Now, isNullPointerConstant() will return true for the following: "(void*)(double*)0"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45951
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Sun, 13 Jan 2008 17:10:08 +0000 (17:10 +0000)]
Change Sema::CheckAddressOfOperation() to respect C99-only addressof rules.
Remove diagnostics from Sema::CheckIndirectionOperand(). C89/C99 allow dereferencing an incomplete type. clang appears to be emulating some incorrect gcc behavior (see below).
void
foo (void)
{
struct b;
struct b* x = 0;
struct b* y = &*x; // gcc produces an error ("dereferencing pointer to incomplete type")
}
With this patch, the above is now allowed.
Bug/Patch by Eli Friedman!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45933
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 13 Jan 2008 05:33:04 +0000 (05:33 +0000)]
Moved destructor logic of templated class ExplodedGraph to non-templated
parent class ExplodedGraphImpl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45930
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 13 Jan 2008 05:03:01 +0000 (05:03 +0000)]
Added node cleanup to dstor of ExplodedGraph.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45929
91177308 -0d34-0410-b5e6-
96231b3b80d8